[gnome-builder] editor: move "save all" menu item to pages section
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: move "save all" menu item to pages section
- Date: Thu, 14 Dec 2017 08:12:49 +0000 (UTC)
commit f1ddfa83d20c684400b9ac3508ac148d18ee2335
Author: Christian Hergert <chergert redhat com>
Date: Thu Dec 14 00:06:02 2017 -0800
editor: move "save all" menu item to pages section
This allows us to make the menu item closer to the list of items that it
acts upon. The goal being to get rid of the hamburger menu altogether if
we can manage it.
data/themes/shared/shared-editor.css | 15 +++++++++++-
src/libide/editor/ide-editor-sidebar.ui | 37 +++++++++++++++++++++++-------
src/libide/gtk/menus.ui | 7 ++++-
3 files changed, 47 insertions(+), 12 deletions(-)
---
diff --git a/data/themes/shared/shared-editor.css b/data/themes/shared/shared-editor.css
index 5003cf8..4f26ace 100644
--- a/data/themes/shared/shared-editor.css
+++ b/data/themes/shared/shared-editor.css
@@ -39,7 +39,7 @@ ideeditorsidebar list.open-pages row box > button:last-child {
border: none;
outline: none;
padding: 0;
- margin: 0 6px;
+ margin: 0 9px 0 6px;
color: @theme_fg_color;
opacity: 0.55;
}
@@ -90,3 +90,16 @@ ideeditorproperties button.control.flat {
min-width: 16px;
min-height: 16px;
}
+ideeditorsidebar .flat-menu-button {
+ border: none;
+ background: transparent;
+ box-shadow: none;
+ opacity: 0.5;
+ padding: 0;
+ margin: 0;
+ outline-offset: -3px;
+}
+ideeditorsidebar .flat-menu-button:checked,
+ideeditorsidebar .flat-menu-button:hover {
+ opacity: 1;
+}
diff --git a/src/libide/editor/ide-editor-sidebar.ui b/src/libide/editor/ide-editor-sidebar.ui
index ad293c7..e03f048 100644
--- a/src/libide/editor/ide-editor-sidebar.ui
+++ b/src/libide/editor/ide-editor-sidebar.ui
@@ -22,14 +22,34 @@
<object class="GtkBox" id="open_pages_section">
<property name="orientation">vertical</property>
<child>
- <object class="GtkLabel">
- <property name="label" translatable="yes" comments="List of pages that are open">Open
Pages</property>
- <property name="xalign">0.0</property>
+ <object class="GtkBox">
+ <property name="orientation">horizontal</property>
+ <property name="spacing">12</property>
<property name="visible">true</property>
- <style>
- <class name="dim-label"/>
- <class name="title"/>
- </style>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes" comments="List of pages that are
open">Open Pages</property>
+ <property name="hexpand">true</property>
+ <property name="xalign">0.0</property>
+ <property name="visible">true</property>
+ <style>
+ <class name="dim-label"/>
+ <class name="title"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="DzlMenuButton">
+ <property name="margin-right">6</property>
+ <property name="show-accels">true</property>
+ <property name="icon-name">pan-down-symbolic</property>
+ <property name="menu-id">pages-menu</property>
+ <property name="visible">true</property>
+ <style>
+ <class name="flat-menu-button"/>
+ </style>
+ </object>
+ </child>
</object>
</child>
<child>
@@ -81,8 +101,7 @@
<object class="DzlMenuButton" id="section_menu_button">
<property name="margin-right">6</property>
<style>
- <class name="image-button"/>
- <class name="flat"/>
+ <class name="flat-menu-button"/>
</style>
</object>
</child>
diff --git a/src/libide/gtk/menus.ui b/src/libide/gtk/menus.ui
index 09f0f09..f829c00 100644
--- a/src/libide/gtk/menus.ui
+++ b/src/libide/gtk/menus.ui
@@ -55,13 +55,16 @@
</item>
</section>
</menu>
- <menu id="gear-menu">
- <section id="gear-menu-save-section">
+ <menu id="pages-menu">
+ <section id="pages-menu-save-section">
<item>
<attribute name="label" translatable="yes">Save _All</attribute>
<attribute name="action">win.save-all</attribute>
+ <attribute name="accel"><primary><shift>s</attribute>
</item>
</section>
+ </menu>
+ <menu id="gear-menu">
<section id="gear-menu-fullscreen-section">
<item>
<attribute name="label" translatable="yes">_Fullscreen</attribute>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]