[gnome-software: 2/4] Simplify carousel arrow buttons
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 2/4] Simplify carousel arrow buttons
- Date: Thu, 14 Oct 2021 11:17:48 +0000 (UTC)
commit d76af9ab023a8458113810e97f0f0c94da34cbf0
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Oct 6 14:56:33 2021 +0200
Simplify carousel arrow buttons
We don't have to add an image to a GtkButton anymore, let's simply use
its icon-name property.
src/gs-featured-carousel.ui | 32 ++++++++++++--------------------
src/gs-screenshot-carousel.ui | 22 ++++------------------
2 files changed, 16 insertions(+), 38 deletions(-)
---
diff --git a/src/gs-featured-carousel.ui b/src/gs-featured-carousel.ui
index 2e84133c7..22f1408cb 100644
--- a/src/gs-featured-carousel.ui
+++ b/src/gs-featured-carousel.ui
@@ -27,26 +27,22 @@
<property name="use-underline">True</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="width-request">56</property>
- <property name="height-request">56</property>
+ <property name="width-request">64</property>
+ <property name="height-request">64</property>
<property name="margin-top">9</property>
<property name="margin-bottom">9</property>
<property name="margin-start">9</property>
<property name="margin-end">9</property>
+ <property name="icon-name">go-previous-symbolic</property>
<signal name="clicked" handler="previous_button_clicked_cb"/>
<accessibility>
<property name="label" translatable="yes">Previous</property>
</accessibility>
<style>
- <class name="osd"/>
- <class name="featured-button-left"/>
+ <class name="circular"/>
+ <class name="flat"/>
+ <class name="image-button"/>
</style>
- <child>
- <object class="GtkImage" id="previous_button_image">
- <property name="icon-name">go-previous-symbolic</property>
- <property name="icon-size">large</property>
- </object>
- </child>
</object>
</child>
<child type="overlay">
@@ -54,26 +50,22 @@
<property name="use-underline">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
- <property name="width-request">56</property>
- <property name="height-request">56</property>
+ <property name="width-request">64</property>
+ <property name="height-request">64</property>
<property name="margin-top">9</property>
<property name="margin-bottom">9</property>
<property name="margin-start">9</property>
<property name="margin-end">9</property>
+ <property name="icon_name">go-next-symbolic</property>
<signal name="clicked" handler="next_button_clicked_cb"/>
<accessibility>
<property name="label" translatable="yes">Next</property>
</accessibility>
<style>
- <class name="osd"/>
- <class name="featured-button-right"/>
+ <class name="circular"/>
+ <class name="flat"/>
+ <class name="image-button"/>
</style>
- <child>
- <object class="GtkImage" id="next_button_image">
- <property name="icon_name">go-next-symbolic</property>
- <property name="icon_size">large</property>
- </object>
- </child>
</object>
</child>
</object>
diff --git a/src/gs-screenshot-carousel.ui b/src/gs-screenshot-carousel.ui
index 4172ccf9f..e2d6ce9da 100644
--- a/src/gs-screenshot-carousel.ui
+++ b/src/gs-screenshot-carousel.ui
@@ -38,6 +38,7 @@
<property name="margin-bottom">9</property>
<property name="margin-start">9</property>
<property name="margin-end">9</property>
+ <property name="icon-name">go-previous-symbolic</property>
<signal name="clicked"
handler="gs_screenshot_carousel_button_previous_clicked_cb" swapped="yes"/>
<accessibility>
<!-- Translators: This is the accessible description for a button to go to the
previous screenshot in the screenshot carousel. -->
@@ -45,17 +46,9 @@
</accessibility>
<style>
<class name="circular"/>
+ <class name="image-button"/>
<class name="osd"/>
</style>
- <child>
- <object class="GtkImage" id="button_previous_image">
- <property name="halign">center</property>
- <property name="icon-name">go-previous-symbolic</property>
- <property name="icon-size">normal</property>
- <property name="valign">center</property>
- <property name="name">previous</property>
- </object>
- </child>
</object>
</child>
</object>
@@ -73,6 +66,7 @@
<property name="margin-bottom">9</property>
<property name="margin-start">9</property>
<property name="margin-end">9</property>
+ <property name="icon-name">go-next-symbolic</property>
<signal name="clicked" handler="gs_screenshot_carousel_button_next_clicked_cb"
swapped="yes"/>
<accessibility>
<!-- Translators: This is the accessible description for a button to go to the
next screenshot in the screenshot carousel. -->
@@ -80,17 +74,9 @@
</accessibility>
<style>
<class name="circular"/>
+ <class name="image-button"/>
<class name="osd"/>
</style>
- <child>
- <object class="GtkImage" id="button_next_image">
- <property name="halign">center</property>
- <property name="icon-name">go-next-symbolic</property>
- <property name="icon-size">normal</property>
- <property name="valign">center</property>
- <property name="name">next</property>
- </object>
- </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]