[Libreoffice-commits] core.git: sw/uiconfig vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 9 16:19:08 UTC 2018


 sw/uiconfig/swriter/ui/characterproperties.ui |    3 ++-
 sw/uiconfig/swriter/ui/paradialog.ui          |    4 +++-
 sw/uiconfig/swriter/ui/templatedialog8.ui     |    3 ++-
 vcl/unx/gtk3/gtk3gtkinst.cxx                  |   10 ++++++++++
 4 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit 0cde3c332d2cc5c470998b6c1ba39705c64621b5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 6 23:52:17 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 9 18:18:46 2018 +0200

    tdf#120371 follow GNOME HIG on tab placement on mega tab notebooks
    
    tradionally we do double/triple decker tab dialogs when there are a lot of tabs,
    that option isn't available with native gtk3 notebooks.
    
    Instead follow
    https://developer.gnome.org/hig-book/unstable/controls-notebooks.html.en#controls-too-many-tabs
    and when there are > 6 tabs position them at-left
    
    Change-Id: I8e6ca78abeec3c1fa9f616c21f21fd7367be2ec9
    Reviewed-on: https://gerrit.libreoffice.org/61487
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/uiconfig/swriter/ui/characterproperties.ui b/sw/uiconfig/swriter/ui/characterproperties.ui
index 61c8443d1541..5bdb13607db3 100644
--- a/sw/uiconfig/swriter/ui/characterproperties.ui
+++ b/sw/uiconfig/swriter/ui/characterproperties.ui
@@ -6,8 +6,9 @@
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="characterproperties|CharacterPropertiesDialog">Character</property>
-    <property name="resizable">False</property>
     <property name="modal">True</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
     <child>
       <placeholder/>
diff --git a/sw/uiconfig/swriter/ui/paradialog.ui b/sw/uiconfig/swriter/ui/paradialog.ui
index 3e0acd0b6f0f..8baaf52050c4 100644
--- a/sw/uiconfig/swriter/ui/paradialog.ui
+++ b/sw/uiconfig/swriter/ui/paradialog.ui
@@ -6,7 +6,9 @@
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="paradialog|ParagraphPropertiesDialog">Paragraph</property>
-    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
     <child>
       <placeholder/>
diff --git a/sw/uiconfig/swriter/ui/templatedialog8.ui b/sw/uiconfig/swriter/ui/templatedialog8.ui
index 720382741b1a..91c9d5fb3025 100644
--- a/sw/uiconfig/swriter/ui/templatedialog8.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog8.ui
@@ -6,8 +6,9 @@
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="templatedialog8|TemplateDialog8">Page Style</property>
-    <property name="resizable">False</property>
     <property name="modal">True</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
     <child>
       <placeholder/>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index b71ba4a72f5b..cef3d1d04e40 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2808,12 +2808,21 @@ private:
         return -1;
     }
 
+    // https://developer.gnome.org/hig-book/unstable/controls-notebooks.html.en#controls-too-many-tabs
+    // tdf#120371 If you have more than about six tabs in a notebook ... place
+    // the list control on the left-hand side of the window
+    void update_tab_pos()
+    {
+        gtk_notebook_set_tab_pos(m_pNotebook, get_n_pages() > 6 ? GTK_POS_LEFT : GTK_POS_TOP);
+    }
+
 public:
     GtkInstanceNotebook(GtkNotebook* pNotebook, bool bTakeOwnership)
         : GtkInstanceContainer(GTK_CONTAINER(pNotebook), bTakeOwnership)
         , m_pNotebook(pNotebook)
         , m_nSignalId(g_signal_connect(pNotebook, "switch-page", G_CALLBACK(signalSwitchPage), this))
     {
+        update_tab_pos();
     }
 
     virtual int get_current_page() const override
@@ -2879,6 +2888,7 @@ public:
     {
         disable_notify_events();
         gtk_notebook_remove_page(m_pNotebook, get_page_number(rIdent));
+        update_tab_pos();
         enable_notify_events();
     }
 


More information about the Libreoffice-commits mailing list