diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2017-09-08 09:24:55 +0300 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-09-09 13:06:05 +0200 |
commit | 2e409c0ffe311eca849c1153d013e7a5260993bd (patch) | |
tree | 397f6645b518925833980497880bb5be9582b442 /cui | |
parent | 67600fe5c9380bdb3eb26809a6475eae30a23231 (diff) |
tdf#112133: Polish the visual appearance of the Customize dialog
* Vertically align the dual list controls at top and bottom
* Vertically center align small controls' captions (search, category)
* Vertically top align captions of large controls (description)
* Horizontally align captions at the keyboard tab
For labels:
* Drop all colons
* Remove the bold font style at the keyboard tab
* Provide mnemonics for all captions with focusable controls (add,
remove, insert, modify, reset... but not description)
* Take care of unique mnemonics (alt+C = category & cancel)
Functional
* Disable the description when nothing is to show there (no offline help
installed), and inform the user via tooltips
Change-Id: I5862f97ec8e5e866f5e56bcdaf386a793f6040d1
Reviewed-on: https://gerrit.libreoffice.org/42099
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com>
Tested-by: Heiko Tietze <tietze.heiko@googlemail.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 24 | ||||
-rw-r--r-- | cui/source/inc/cfg.hxx | 1 | ||||
-rw-r--r-- | cui/uiconfig/ui/accelconfigpage.ui | 21 | ||||
-rw-r--r-- | cui/uiconfig/ui/menuassignpage.ui | 70 |
4 files changed, 83 insertions, 33 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 94cbe5f2f724..0afb97ec10ec 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1165,8 +1165,9 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const SfxItemSet& rSet) get(m_pInsertBtn, "insert"); get(m_pModifyBtn, "modify"); get(m_pResetBtn, "resetbtn"); + get(m_pDescriptionFieldLb, "descriptionlabel"); get(m_pDescriptionField, "desc"); - m_pDescriptionField->set_height_request(m_pDescriptionField->GetTextHeight()*4); + m_pDescriptionField->set_height_request(m_pDescriptionField->GetTextHeight()*2.9); get(m_pEntries, "entries"); Size aSize(LogicToPixel(Size(108, 115), MapUnit::MapAppFont)); m_pEntries->set_height_request(aSize.Height()); @@ -1213,6 +1214,7 @@ void SvxConfigPage::dispose() m_pInsertBtn.clear(); m_pModifyBtn.clear(); m_pResetBtn.clear(); + m_pDescriptionFieldLb.clear(); m_pDescriptionField.clear(); m_pContentsListBox.disposeAndClear(); @@ -1778,6 +1780,9 @@ IMPL_LINK( SvxConfigPage, MoveHdl, Button *, pButton, void ) IMPL_LINK_NOARG( SvxConfigPage, SelectFunctionHdl, SvTreeListBox *, void ) { + // Store the tooltip of the description field at first run + static const OUString sDescTooltip = m_pDescriptionField->GetQuickHelpText(); + // GetScriptURL() returns a non-empty string if a // valid command is selected on the left box bool bIsValidCommand = !GetScriptURL().isEmpty(); @@ -1797,6 +1802,23 @@ IMPL_LINK_NOARG( SvxConfigPage, SelectFunctionHdl, SvTreeListBox *, void ) m_pDescriptionField->SetText(""); } + + // Disable the description field and its label if there is no help text to display + // And inform the user via tooltips + if ( m_pDescriptionField->GetText().isEmpty() ) + { + m_pDescriptionField->Disable(); + m_pDescriptionFieldLb->Disable(); + m_pDescriptionField->SetQuickHelpText( sDescTooltip ); + m_pDescriptionFieldLb->SetQuickHelpText( sDescTooltip ); + } + else + { + m_pDescriptionField->Enable(); + m_pDescriptionFieldLb->Enable(); + m_pDescriptionField->SetQuickHelpText(""); + m_pDescriptionFieldLb->SetQuickHelpText(""); + } } IMPL_LINK_NOARG(SvxConfigPage, SearchUpdateHdl, Edit&, void) diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 239860943a7b..3185750ffd7a 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -390,6 +390,7 @@ protected: VclPtr<CommandCategoryListBox> m_pCommandCategoryListBox; VclPtr<SfxConfigFunctionListBox> m_pFunctions; + VclPtr<FixedText> m_pDescriptionFieldLb; VclPtr<VclMultiLineEdit> m_pDescriptionField; // Right side of the dialog where the contents of the selected diff --git a/cui/uiconfig/ui/accelconfigpage.ui b/cui/uiconfig/ui/accelconfigpage.ui index 1296e9b01e11..1cef5a0d7306 100644 --- a/cui/uiconfig/ui/accelconfigpage.ui +++ b/cui/uiconfig/ui/accelconfigpage.ui @@ -31,8 +31,9 @@ <property name="can_focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> + <property name="xalign">0</property> + <property name="yalign">0</property> <property name="top_padding">6</property> - <property name="left_padding">12</property> <child> <object class="cuilo-SfxAccCfgTabListBox" id="shortcuts:border"> <property name="visible">True</property> @@ -50,10 +51,9 @@ <object class="GtkLabel" id="label21"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes" context="accelconfigpage|label21">Shortcut Keys</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> + <property name="label" translatable="yes" context="accelconfigpage|label21">Shortcu_t Keys</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">shortcuts:border</property> </object> </child> </object> @@ -231,8 +231,9 @@ <property name="can_focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> + <property name="xalign">0</property> + <property name="yalign">0</property> <property name="top_padding">6</property> - <property name="left_padding">12</property> <child> <object class="GtkBox"> <property name="visible">True</property> @@ -242,6 +243,7 @@ <object class="GtkEntry" id="searchEntry"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="margin_bottom">5</property> <property name="placeholder_text" translatable="yes" context="accelconfigpage|searchEntry">Type to search</property> </object> <packing> @@ -360,10 +362,9 @@ <object class="GtkLabel" id="label22"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes" context="accelconfigpage|label22">Functions</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> + <property name="label" translatable="yes" context="accelconfigpage|label22">F_unctions</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">searchEntry</property> </object> </child> </object> diff --git a/cui/uiconfig/ui/menuassignpage.ui b/cui/uiconfig/ui/menuassignpage.ui index 4567c25d1fe1..faf402b44fbf 100644 --- a/cui/uiconfig/ui/menuassignpage.ui +++ b/cui/uiconfig/ui/menuassignpage.ui @@ -150,7 +150,7 @@ <property name="layout_style">start</property> <child> <object class="GtkButton" id="insert:insertmenu"> - <property name="label" translatable="yes">Insert</property> + <property name="label" translatable="yes">_Insert</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -158,6 +158,7 @@ <property name="margin_right">5</property> <property name="margin_top">5</property> <property name="margin_bottom">5</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">True</property> @@ -167,7 +168,7 @@ </child> <child> <object class="GtkButton" id="modify:modifymenu"> - <property name="label" translatable="yes">Modify</property> + <property name="label" translatable="yes">_Modify</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -175,6 +176,7 @@ <property name="margin_right">5</property> <property name="margin_top">5</property> <property name="margin_bottom">5</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">True</property> @@ -184,7 +186,7 @@ </child> <child> <object class="GtkButton" id="resetbtn"> - <property name="label" translatable="yes">Reset</property> + <property name="label" translatable="yes">Rese_t</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -192,6 +194,7 @@ <property name="margin_right">5</property> <property name="margin_top">5</property> <property name="margin_bottom">5</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">True</property> @@ -224,11 +227,12 @@ </packing> </child> <child> - <object class="GtkButton"> - <property name="label" translatable="yes">Function</property> + <object class="GtkButton" id="functionbtn"> + <property name="label" translatable="yes">_Function</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> + <property name="use_underline">True</property> <property name="image_position">right</property> </object> <packing> @@ -260,13 +264,14 @@ </child> <child> <object class="GtkButton" id="plusbtn"> - <property name="label" translatable="yes">+</property> + <property name="label" translatable="yes">_+</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="margin_left">5</property> <property name="margin_right">5</property> <property name="hexpand">True</property> + <property name="use_underline">True</property> <property name="always_show_image">True</property> </object> <packing> @@ -276,11 +281,12 @@ </child> <child> <object class="GtkButton" id="minusbtn"> - <property name="label" translatable="yes">-</property> + <property name="label" translatable="yes">_-</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> + <property name="use_underline">True</property> </object> <packing> <property name="left_attach">2</property> @@ -329,8 +335,8 @@ <object class="GtkLabel" id="descriptionlabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes" context="menuassignpage|label33">_Description</property> - <property name="use_underline">True</property> + <property name="valign">start</property> + <property name="label" translatable="yes" context="menuassignpage|label33">Description</property> <property name="xalign">0</property> </object> <packing> @@ -343,10 +349,13 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="valign">start</property> - <property name="label" translatable="yes" context="menuassignpage|contentslabel">Function:</property> + <property name="label" translatable="yes" context="menuassignpage|contentslabel">_Function</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">entries</property> + <property name="mnemonic_widget">functions:border</property> <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="functions:border"/> + </accessibility> </object> <packing> <property name="left_attach">0</property> @@ -383,10 +392,15 @@ </packing> </child> <child> - <object class="GtkLabel"> + <object class="GtkLabel" id="addlabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Add</property> + <property name="label" translatable="yes">_Add</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">add</property> + <accessibility> + <relation type="label-for" target="add"/> + </accessibility> </object> <packing> <property name="left_attach">0</property> @@ -423,10 +437,15 @@ </packing> </child> <child> - <object class="GtkLabel"> + <object class="GtkLabel" id="removelabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Remove</property> + <property name="label" translatable="yes">Remo_ve</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">remove</property> + <accessibility> + <relation type="label-for" target="remove"/> + </accessibility> </object> <packing> <property name="left_attach">0</property> @@ -470,6 +489,7 @@ <object class="GtkTextView" id="desc:border"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes">Local help is not installed.</property> <property name="editable">False</property> <property name="cursor_visible">False</property> <property name="accepts_tab">False</property> @@ -485,12 +505,15 @@ <object class="GtkLabel" id="searchlabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="valign">start</property> + <property name="valign">center</property> <property name="margin_bottom">5</property> - <property name="label" translatable="yes" context="menuassignpage|contentslabel">Search:</property> + <property name="label" translatable="yes" context="menuassignpage|contentslabel">_Search</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">entries</property> + <property name="mnemonic_widget">searchEntry</property> <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="searchEntry"/> + </accessibility> </object> <packing> <property name="left_attach">0</property> @@ -513,12 +536,15 @@ <object class="GtkLabel" id="categorylabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="valign">start</property> + <property name="valign">center</property> <property name="margin_bottom">5</property> - <property name="label" translatable="yes" context="menuassignpage|contentslabel">Category:</property> + <property name="label" translatable="yes" context="menuassignpage|contentslabel">Categor_y</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">entries</property> + <property name="mnemonic_widget">commandcategorylist</property> <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="commandcategorylist"/> + </accessibility> </object> <packing> <property name="left_attach">0</property> @@ -554,7 +580,7 @@ </object> </child> <child type="label"> - <object class="GtkLabel"> + <object class="GtkLabel" id="labelx"> <property name="can_focus">False</property> <property name="label" translatable="yes">Label</property> </object> |