[gnome-software] Restyle how the installed label is shown in the search results
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Restyle how the installed label is shown in the search results
- Date: Sat, 26 Nov 2016 15:11:20 +0000 (UTC)
commit 09aeb680fe3b39796c9c7c02bef04bc62e18d973
Author: Joaquim Rocha <jrocha endlessm com>
Date: Sat Nov 26 12:34:30 2016 +0100
Restyle how the installed label is shown in the search results
src/gs-app-row.ui | 406 ++++++++++++++++++++++++++------------------------
src/gtk-style-hc.css | 2 +-
src/gtk-style.css | 7 +-
3 files changed, 214 insertions(+), 201 deletions(-)
---
diff --git a/src/gs-app-row.ui b/src/gs-app-row.ui
index ee72608..622129a 100644
--- a/src/gs-app-row.ui
+++ b/src/gs-app-row.ui
@@ -7,42 +7,76 @@
<class name="list-box-app-row"/>
</style>
<child>
- <object class="GtkOverlay" id="overlay">
+ <object class="GtkBox" id="box">
<property name="visible">True</property>
- <property name="halign">fill</property>
- <property name="valign">fill</property>
- <child type="overlay">
- <object class="GtkEventBox" id="label_installed">
- <property name="no_show_all">True</property>
- <property name="visible_window">True</property>
- <property name="halign">end</property>
- <property name="valign">end</property>
- <property name="margin-bottom">15</property>
- <style>
- <class name="installed-overlay-box"/>
- </style>
- <child>
- <object class="GtkLabel" id="installed-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Installed</property>
- <property name="margin-start">16</property>
- <property name="margin-end">16</property>
- <property name="margin-top">4</property>
- <property name="margin-bottom">4</property>
- </object>
- </child>
+ <property name="margin_top">16</property>
+ <property name="margin_bottom">16</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkCheckButton" id="checkbox">
+ <property name="margin-start">12</property>
+ <property name="valign">center</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
</child>
<child>
- <object class="GtkBox" id="box">
+ <object class="GtkImage" id="image">
<property name="visible">True</property>
- <property name="margin_top">16</property>
- <property name="margin_bottom">16</property>
- <property name="orientation">horizontal</property>
+ <property name="pixel_size">64</property>
+ <property name="margin_start">24</property>
+ <property name="valign">center</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="name_box">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="margin-start">12</property>
+ <property name="margin-top">3</property>
+ <property name="spacing">3</property>
+ <property name="valign">fill</property>
<child>
- <object class="GtkCheckButton" id="checkbox">
- <property name="margin-start">12</property>
- <property name="valign">center</property>
+ <object class="GtkLabel" id="name_label">
+ <property name="visible">True</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">20</property>
+ <property name="xalign">0.0</property>
+ <property name="yalign">0.5</property>
+ <property name="ellipsize">end</property>
+ <property name="lines">3</property>
+ <property name="wrap-mode">word-char</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="version_label">
+ <property name="visible">True</property>
+ <property name="xalign">0.0</property>
+ <property name="yalign">0.5</property>
+ <property name="ellipsize">end</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GsStarWidget" id="star">
+ <property name="visible">False</property>
+ <property name="halign">start</property>
</object>
<packing>
<property name="expand">False</property>
@@ -50,221 +84,198 @@
</packing>
</child>
<child>
- <object class="GtkImage" id="image">
+ <object class="GtkLabel" id="folder_label">
<property name="visible">True</property>
- <property name="pixel_size">64</property>
- <property name="margin_start">24</property>
- <property name="valign">center</property>
+ <property name="margin_top">6</property>
+ <property name="xalign">0.0</property>
+ <property name="yalign">0.5</property>
+ <property name="halign">start</property>
+ <property name="ellipsize">end</property>
+ <style>
+ <class name="folder-label"/>
+ </style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box_description">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">3</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">3</property>
<child>
- <object class="GtkBox" id="name_box">
+ <object class="GtkLabel" id="description_label">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="margin-start">12</property>
- <property name="margin-top">3</property>
- <property name="spacing">3</property>
- <property name="valign">fill</property>
- <child>
- <object class="GtkLabel" id="name_label">
- <property name="visible">True</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">20</property>
- <property name="xalign">0.0</property>
- <property name="yalign">0.5</property>
- <property name="ellipsize">end</property>
- <property name="lines">3</property>
- <property name="wrap-mode">word-char</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="version_label">
- <property name="visible">True</property>
- <property name="xalign">0.0</property>
- <property name="yalign">0.5</property>
- <property name="ellipsize">end</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GsStarWidget" id="star">
- <property name="visible">False</property>
- <property name="halign">start</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="folder_label">
- <property name="visible">True</property>
- <property name="margin_top">6</property>
- <property name="xalign">0.0</property>
- <property name="yalign">0.5</property>
- <property name="halign">start</property>
- <property name="ellipsize">end</property>
- <style>
- <class name="folder-label"/>
- </style>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="margin_start">24</property>
+ <property name="margin_end">24</property>
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
+ <property name="ellipsize">end</property>
+ <property name="lines">2</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="expand">True</property>
<property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box_description">
+ <object class="GtkBox" id="box_tag">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_top">3</property>
+ <property name="spacing">4</property>
+ <property name="margin_left">24</property>
<property name="orientation">vertical</property>
- <property name="spacing">3</property>
<child>
- <object class="GtkLabel" id="description_label">
- <property name="visible">True</property>
+ <object class="GtkLabel" id="label_warning">
<property name="can_focus">False</property>
- <property name="valign">start</property>
- <property name="margin_start">24</property>
- <property name="margin_end">24</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <property name="ellipsize">end</property>
- <property name="lines">2</property>
- <property name="xalign">0</property>
+ <property name="label">warning-text</property>
+ <property name="halign">start</property>
+ <property name="ellipsize">middle</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ <attribute name="foreground" value="#cccc00000000"/>
+ </attributes>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box_tag">
+ <object class="GtkBox" id="box_desc">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
- <property name="margin_left">24</property>
- <property name="orientation">vertical</property>
+ <property name="orientation">horizontal</property>
<child>
- <object class="GtkLabel" id="label_warning">
- <property name="can_focus">False</property>
- <property name="label">warning-text</property>
+ <object class="GtkLabel" id="label_origin">
+ <property name="visible">True</property>
+ <property name="xalign">0.0</property>
+ <property name="yalign">1.0</property>
<property name="halign">start</property>
- <property name="ellipsize">middle</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- <attribute name="foreground" value="#cccc00000000"/>
- </attributes>
+ <property name="ellipsize">end</property>
+ <style>
+ <class name="app-row-origin-text"/>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">3</property>
</packing>
</child>
- <child>
- <object class="GtkBox" id="box_desc">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">horizontal</property>
- <child>
- <object class="GtkLabel" id="label_origin">
- <property name="visible">True</property>
- <property name="xalign">0.0</property>
- <property name="yalign">1.0</property>
- <property name="halign">start</property>
- <property name="ellipsize">end</property>
- <style>
- <class name="app-row-origin-text"/>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
+ <child>
+ <object class="GtkBox" id="label_installed">
+ <property name="orientation">horizontal</property>
+ <property name="no_show_all">True</property>
+ <property name="halign">end</property>
+ <property name="valign">end</property>
+ <property name="spacing">6</property>
+ <property name="margin-right">24</property>
+ <child>
+ <object class="GtkImage" id="installed-icon">
+ <property name="visible">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="margin-bottom">4</property>
+ <property name="pixel-size">16</property>
+ <property name="icon-name">software-installed-symbolic</property>
+ <style>
+ <class name="installed-icon"/>
+ <class name="app-row-installed-icon"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="installed-label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Installed</property>
+ <style>
+ <class name="app-row-installed-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
- </child>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="button_box">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
<child>
- <object class="GtkBox" id="button_box">
- <property name="visible">True</property>
- <property name="orientation">horizontal</property>
+ <object class="GsProgressButton" id="button">
+ <property name="margin_end">24</property>
+ <property name="width_request">100</property>
+ <property name="halign">end</property>
+ </object>
+ <packing>
+ <property name="pack_type">end</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinner" id="spinner">
+ <property name="margin_start">12</property>
+ <property name="margin_end">12</property>
+ <property name="halign">end</property>
+ </object>
+ <packing>
+ <property name="pack_type">end</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label">
+ <property name="margin_start">12</property>
+ <property name="margin_end">12</property>
<property name="halign">end</property>
- <property name="valign">center</property>
- <child>
- <object class="GsProgressButton" id="button">
- <property name="margin_end">24</property>
- <property name="width_request">100</property>
- <property name="halign">end</property>
- </object>
- <packing>
- <property name="pack_type">end</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinner" id="spinner">
- <property name="margin_start">12</property>
- <property name="margin_end">12</property>
- <property name="halign">end</property>
- </object>
- <packing>
- <property name="pack_type">end</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label">
- <property name="margin_start">12</property>
- <property name="margin_end">12</property>
- <property name="halign">end</property>
- </object>
- <packing>
- <property name="pack_type">end</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
</object>
<packing>
<property name="pack_type">end</property>
@@ -273,6 +284,11 @@
</packing>
</child>
</object>
+ <packing>
+ <property name="pack_type">end</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
</child>
</object>
</child>
diff --git a/src/gtk-style-hc.css b/src/gtk-style-hc.css
index f10c966..1a78e64 100644
--- a/src/gtk-style-hc.css
+++ b/src/gtk-style-hc.css
@@ -13,7 +13,7 @@
text-shadow: none;
}
-.installed-icon {
+.installed-icon, .app-row-installed-label {
color: #999999;
}
diff --git a/src/gtk-style.css b/src/gtk-style.css
index 1cc2a25..ae634c4 100644
--- a/src/gtk-style.css
+++ b/src/gtk-style.css
@@ -30,11 +30,8 @@
}
.app-row-installed-label {
- background-color: @theme_selected_bg_color;
- border-radius: 0;
- color: @theme_selected_fg_color;
- text-shadow: 0 1px 0 rgba(0,0,0,0.5);
- padding: 4px 12px;
+ color: @theme_selected_bg_color;
+ font-size: smaller;
}
.needs-attention {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]