[gtk+] Simplify actionbar
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Simplify actionbar
- Date: Sat, 19 Dec 2015 03:58:39 +0000 (UTC)
commit a3fd5a010b59187b5ce739b0eb07d6ccd2b02887
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 18 22:57:16 2015 -0500
Simplify actionbar
We don't need a frame widget here, just render a top border on the
box.
gtk/gtkactionbar.c | 3 ++-
gtk/theme/Adwaita/_common.scss | 5 +----
gtk/theme/Adwaita/gtk-contained-dark.css | 6 ++----
gtk/theme/Adwaita/gtk-contained.css | 6 ++----
gtk/ui/gtkactionbar.ui | 12 ++----------
5 files changed, 9 insertions(+), 23 deletions(-)
---
diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c
index b88b1d8..84c43a8 100644
--- a/gtk/gtkactionbar.c
+++ b/gtk/gtkactionbar.c
@@ -251,8 +251,9 @@ gtk_action_bar_allocate (GtkCssGadget *gadget,
gpointer data)
{
GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
+ GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (widget));
- GTK_WIDGET_CLASS (gtk_action_bar_parent_class)->size_allocate (widget, (GtkAllocation *)allocation);
+ gtk_widget_size_allocate (priv->revealer, (GtkAllocation *)allocation);
gtk_container_get_children_clip (GTK_CONTAINER (widget), out_clip);
}
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 250dce1..17fa5c7 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2514,12 +2514,9 @@ paper {
&:backdrop { border-color: $backdrop_borders_color; }
}
-actionbar frame border {
- border-width: 1px 0 0;
-}
-
actionbar box {
padding: 6px;
+ border-width: 1px 0 0;
}
placessidebar,
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 9db0bb5..c5c0749 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -3506,11 +3506,9 @@ paper {
paper:backdrop {
border-color: #1f2222; }
-actionbar frame border {
- border-width: 1px 0 0; }
-
actionbar box {
- padding: 6px; }
+ padding: 6px;
+ border-width: 1px 0 0; }
placessidebar viewport.frame,
scrolledwindow viewport.frame {
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 5d0a833..72012a9 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -3668,11 +3668,9 @@ paper {
paper:backdrop {
border-color: #a5a5a1; }
-actionbar frame border {
- border-width: 1px 0 0; }
-
actionbar box {
- padding: 6px; }
+ padding: 6px;
+ border-width: 1px 0 0; }
placessidebar viewport.frame,
scrolledwindow viewport.frame {
diff --git a/gtk/ui/gtkactionbar.ui b/gtk/ui/gtkactionbar.ui
index 16fab16..d826768 100644
--- a/gtk/ui/gtkactionbar.ui
+++ b/gtk/ui/gtkactionbar.ui
@@ -6,17 +6,9 @@
<object class="GtkRevealer" id="revealer">
<property name="visible">1</property>
<child>
- <object class="GtkFrame" id="frame">
+ <object class="GtkBox" id="box">
<property name="visible">1</property>
- <style>
- <class name="action-bar"/>
- </style>
- <child>
- <object class="GtkBox" id="box">
- <property name="visible">1</property>
- <property name="spacing">6</property>
- </object>
- </child>
+ <property name="spacing">6</property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]