[gnome-maps] mapBubble: Clean up margins, spacing, UI files
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] mapBubble: Clean up margins, spacing, UI files
- Date: Sun, 15 Nov 2020 21:43:11 +0000 (UTC)
commit 14d174fd96ccb25494305a0cd20b68b37b5644aa
Author: James Westman <james flyingpimonster net>
Date: Wed Aug 5 19:45:02 2020 -0500
mapBubble: Clean up margins, spacing, UI files
Changed some margins and spacing, and converted a few GtkGrids into GtkBoxes.
data/ui/map-bubble.ui | 166 +++++++++++++++++-----------------------
data/ui/place-bubble.ui | 114 ++++++++++++++-------------
data/ui/user-location-bubble.ui | 1 +
src/mapBubble.js | 4 +-
4 files changed, 134 insertions(+), 151 deletions(-)
---
diff --git a/data/ui/map-bubble.ui b/data/ui/map-bubble.ui
index 07f188c1..4d345b2e 100644
--- a/data/ui/map-bubble.ui
+++ b/data/ui/map-bubble.ui
@@ -2,128 +2,106 @@
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.12"/>
- <object class="GtkGrid" id="bubble-main-grid">
+ <object class="GtkBox" id="bubble-main-box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="column_spacing">8</property>
- <property name="margin_start">10</property>
- <property name="margin_end">10</property>
- <property name="margin_top">10</property>
- <property name="margin_bottom">10</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkGrid" id="bubble-content-area">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin-start">15</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">2</property>
- </packing>
</child>
<child>
- <object class="GtkGrid" id="bubble-button-area">
+ <object class="GtkBox" id="bubble-button-area">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin-top">10</property>
- <property name="margin-start">15</property>
- <property name="valign">GTK_ALIGN_END</property>
+ <property name="orientation">horizontal</property>
+ <property name="spacing">6</property>
+ <property name="margin-bottom">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
<child>
- <object class="GtkBox" id="bubble-standard-button-area">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">horizontal</property>
- <property name="spacing">5</property>
+ <object class="GtkButton" id="bubble-route-button">
+ <property name="name">bubble-route-button</property>
+ <property name="visible">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip-text" translatable="yes" comments="Translators: This is a tooltip">Add
to new route</property>
<child>
- <object class="GtkButton" id="bubble-route-button">
- <property name="name">bubble-route-button</property>
- <property name="visible">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip-text" translatable="yes" comments="Translators: This is a
tooltip">Add to new route</property>
- <child>
- <object class="GtkImage" id="bubble-route-button-image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon-name">route-button-symbolic</property>
- <property name="icon_size">1</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="bubble-send-to-button">
- <property name="name">bubble-send-to-button</property>
- <property name="visible">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip-text" translatable="yes" comments="Translators: This is a
tooltip">Share location</property>
- <child>
- <object class="GtkImage" id="bubble-send-to-button-image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon-name">send-to-symbolic</property>
- <property name="pixel_size">16</property>
- </object>
- </child>
+ <object class="GtkImage" id="bubble-route-button-image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">route-button-symbolic</property>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="bubble-send-to-button">
+ <property name="name">bubble-send-to-button</property>
+ <property name="visible">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip-text" translatable="yes" comments="Translators: This is a tooltip">Share
location</property>
<child>
- <object class="GtkButton" id="bubble-favorite-button">
- <property name="name">bubble-favorite-button</property>
- <property name="visible">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip-text" translatable="yes" comments="Translators: This is a
tooltip">Mark as favorite</property>
- <child>
- <object class="GtkImage" id="bubble-favorite-button-image">
- <property name="name">bubble-favorite-button-image</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon-name">starred-symbolic</property>
- <property name="pixel_size">16</property>
- </object>
- </child>
+ <object class="GtkImage" id="bubble-send-to-button-image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">send-to-symbolic</property>
+ <property name="pixel_size">16</property>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="bubble-favorite-button">
+ <property name="name">bubble-favorite-button</property>
+ <property name="visible">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip-text" translatable="yes" comments="Translators: This is a tooltip">Mark
as favorite</property>
<child>
- <object class="GtkButton" id="bubble-check-in-button">
- <property name="label" translatable="yes" comments="Translators: Check in is used as a
verb">C_heck in</property>
- <property name="visible">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="tooltip-text" translatable="yes" comments="Translators: This is a
tooltip">Check in here</property>
+ <object class="GtkImage" id="bubble-favorite-button-image">
+ <property name="name">bubble-favorite-button-image</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">starred-symbolic</property>
+ <property name="pixel_size">16</property>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="bubble-check-in-button">
+ <property name="label" translatable="yes" comments="Translators: Check in is used as a
verb">C_heck in</property>
+ <property name="visible">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="tooltip-text" translatable="yes" comments="Translators: This is a tooltip">Check
in here</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="bubble-edit-button">
+ <property name="visible">False</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip-text" translatable="yes" comments="Translators: This is a tooltip">Edit
on OpenStreetMap</property>
<child>
- <object class="GtkButton" id="bubble-edit-button">
- <property name="visible">False</property>
- <property name="can_focus">True</property>
- <property name="tooltip-text" translatable="yes" comments="Translators: This is a
tooltip">Edit on OpenStreetMap</property>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon-name">document-edit-symbolic</property>
- <property name="pixel_size">16</property>
- </object>
- </child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">document-edit-symbolic</property>
+ <property name="pixel_size">16</property>
</object>
</child>
</object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
</child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
</child>
</object>
</interface>
diff --git a/data/ui/place-bubble.ui b/data/ui/place-bubble.ui
index 57eb682c..ccb899fe 100644
--- a/data/ui/place-bubble.ui
+++ b/data/ui/place-bubble.ui
@@ -18,80 +18,84 @@
<child>
<object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkGrid">
+ <object class="GtkLabel" id="label-title">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="expand">True</property>
+ <property name="use_markup">True</property>
+ <style>
+ <class name="bubble-title"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="expand-button">
<property name="visible">True</property>
- <property name="column-spacing">10</property>
+ <property name="can_focus">True</property>
+ <property name="valign">GTK_ALIGN_START</property>
+ <property name="halign">GTK_ALIGN_CENTER</property>
+ <property name="tooltip-text" translatable="yes" comments="Translators: This is a
tooltip">Show more information</property>
<child>
- <object class="GtkLabel" id="label-title">
+ <object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="expand">True</property>
- <property name="use_markup">True</property>
- <style>
- <class name="bubble-title"/>
- </style>
+ <property name="icon-name">view-more-symbolic</property>
+ <property name="pixel_size">16</property>
</object>
</child>
- <child>
- <object class="GtkToggleButton" id="expand-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="valign">GTK_ALIGN_START</property>
- <property name="halign">GTK_ALIGN_CENTER</property>
- <property name="tooltip-text" translatable="yes" comments="Translators: This is a
tooltip">Show more information</property>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon-name">view-more-symbolic</property>
- <property name="pixel_size">16</property>
- </object>
- </child>
- <style>
- <class name="image-button"/>
- <class name="circular"/>
- <class name="flat"/>
- </style>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="box-content">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
<style>
- <class name="bubble-content"/>
+ <class name="image-button"/>
+ <class name="circular"/>
+ <class name="flat"/>
</style>
</object>
</child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box-content">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <style>
+ <class name="bubble-content"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRevealer" id="content-revealer">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="vexpand">True</property>
+ <property name="margin-top">5</property>
<child>
- <object class="GtkRevealer" id="content-revealer">
+ <object class="GtkGrid" id="expanded-content">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="vexpand">True</property>
- <property name="margin-top">5</property>
- <child>
- <object class="GtkGrid" id="expanded-content">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="vexpand">True</property>
- <property name="column-spacing">5</property>
- <style>
- <class name="bubble-content"/>
- </style>
- </object>
- </child>
+ <property name="column-spacing">5</property>
+ <style>
+ <class name="bubble-content"/>
+ </style>
</object>
</child>
</object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
+ </packing>
</child>
</object>
</child>
diff --git a/data/ui/user-location-bubble.ui b/data/ui/user-location-bubble.ui
index 9bf448b6..58007df5 100644
--- a/data/ui/user-location-bubble.ui
+++ b/data/ui/user-location-bubble.ui
@@ -5,6 +5,7 @@
<object class="GtkGrid" id="grid-content">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="label-title">
<property name="visible">True</property>
diff --git a/src/mapBubble.js b/src/mapBubble.js
index 3c7fd589..aa17f4dd 100644
--- a/src/mapBubble.js
+++ b/src/mapBubble.js
@@ -69,7 +69,7 @@ class MapBubble extends Gtk.Popover {
params.modal = false;
super._init(params);
- let ui = Utils.getUIObject('map-bubble', [ 'bubble-main-grid',
+ let ui = Utils.getUIObject('map-bubble', [ 'bubble-main-box',
'bubble-content-area',
'bubble-button-area',
'bubble-route-button',
@@ -95,7 +95,7 @@ class MapBubble extends Gtk.Popover {
this._initEditButton(ui.bubbleEditButton);
}
- this.add(ui.bubbleMainGrid);
+ this.add(ui.bubbleMainBox);
}
get place() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]