diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-25 12:03:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-25 12:43:35 +0000 |
commit | 18a0d02e076c77d2f07f01bc4ccec358661a82b3 (patch) | |
tree | b728c518eee1df445b80541c52a0731270ba6fab | |
parent | 233f3e6d71c5a4c1cdf572198a3303dcc9697be2 (diff) |
some minor .ui conversion nits
ObjectNameDialog:
- Lets make it resizeable. Set a "width in chars" on the edit box to make it
wide enough, that way we don't have to about setting a size request
in pixels
ObjectTitleNameDialog
- Lets make it resizeable, as above.
- The original had a scrollbar, so added a scrolledwindow to it with
always vertically scroll
- For the textview to give it a default height, rather than using
pixels I let it take its width by expand to the above edit widget width
- For its height, added a non-translated text buffer with 5 blank lines
and tweaked the ctor to set that as its permanent height request
- GtkTextView maps to VclMultiLineEdit instead of "MultiLineEdit"
its a corner case, they should be equivalent, so just changed
MultiLineEdit to VclMultiLineEdit
NameDialog:
- width requests as above
- set name_entry as the mnemonic widget of name_entry
MessBox:
- I set the label to be vertically centered for the resizeable case
Change-Id: I9ab9eb76aa64b4d7eaf1c9a738f9c29cd7f7820b
-rw-r--r-- | cui/source/dialogs/dlgname.cxx | 2 | ||||
-rw-r--r-- | cui/source/inc/dlgname.hxx | 6 | ||||
-rw-r--r-- | cui/uiconfig/ui/namedialog.ui | 65 |
3 files changed, 41 insertions, 32 deletions
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index a3af8bdd0f8e..e6541bd11239 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -112,6 +112,8 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog( { get(pEdtTitle, "object_title_entry"); get(pEdtDescription, "desc_entry"); + //lock height to initial height + pEdtDescription->set_height_request(pEdtDescription->get_preferred_size().Height()); // set title & desc pEdtTitle->SetText(rTitle); pEdtDescription->SetText(rDescription); diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx index 99c89db1e0e5..ab9c3d824b32 100644 --- a/cui/source/inc/dlgname.hxx +++ b/cui/source/inc/dlgname.hxx @@ -24,9 +24,7 @@ #include <vcl/button.hxx> #include <vcl/dialog.hxx> #include <vcl/fixed.hxx> - -// #i68101# -#include <svtools/svmedit.hxx> +#include <vcl/vclmedit.hxx> // #i68101# /// Dialog for editing a name class SvxNameDialog : public ModalDialog @@ -115,7 +113,7 @@ private: Edit* pEdtTitle; // description - MultiLineEdit* pEdtDescription; + VclMultiLineEdit* pEdtDescription; // buttons OKButton* pBtnOK; diff --git a/cui/uiconfig/ui/namedialog.ui b/cui/uiconfig/ui/namedialog.ui index d0a7d8381ec2..85cbc48b4661 100644 --- a/cui/uiconfig/ui/namedialog.ui +++ b/cui/uiconfig/ui/namedialog.ui @@ -83,7 +83,6 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> - <property name="yalign">0</property> </object> <packing> <property name="expand">True</property> @@ -107,12 +106,9 @@ </action-widgets> </object> <object class="GtkDialog" id="NameDialog"> - <property name="width_request">475</property> - <property name="height_request">120</property> <property name="can_focus">False</property> <property name="border_width">5</property> <property name="title" translatable="yes">Name</property> - <property name="resizable">False</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> @@ -120,44 +116,44 @@ <property name="spacing">2</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> - <property name="height_request">120</property> <property name="can_focus">False</property> <property name="orientation">vertical</property> <property name="layout_style">end</property> <child> - <object class="GtkButton" id="help"> - <property name="label">gtk-help</property> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> <property name="receives_default">True</property> <property name="use_stock">True</property> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">2</property> + <property name="position">0</property> + <property name="secondary">True</property> </packing> </child> <child> - <object class="GtkButton" id="ok"> - <property name="label">gtk-ok</property> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> <property name="receives_default">True</property> <property name="use_stock">True</property> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">0</property> + <property name="position">1</property> <property name="secondary">True</property> </packing> </child> <child> - <object class="GtkButton" id="cancel"> - <property name="label">gtk-cancel</property> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -166,8 +162,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> - <property name="secondary">True</property> + <property name="position">2</property> </packing> </child> </object> @@ -190,7 +185,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> + <property name="use_underline">True</property> <property name="wrap">True</property> + <property name="mnemonic_widget">name_entry</property> </object> <packing> <property name="expand">False</property> @@ -203,6 +200,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">•</property> + <property name="width_chars">55</property> </object> <packing> <property name="expand">False</property> @@ -220,18 +218,15 @@ </object> </child> <action-widgets> - <action-widget response="0">help</action-widget> <action-widget response="-3">ok</action-widget> <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> </action-widgets> </object> <object class="GtkDialog" id="ObjectNameDialog"> - <property name="width_request">475</property> - <property name="height_request">120</property> <property name="can_focus">False</property> <property name="border_width">5</property> <property name="title" translatable="yes">Name</property> - <property name="resizable">False</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox3"> @@ -322,6 +317,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">•</property> + <property name="width_chars">55</property> <property name="invisible_char_set">True</property> </object> <packing> @@ -351,11 +347,9 @@ <property name="page_increment">10</property> </object> <object class="GtkDialog" id="ObjectTitleDescDialog"> - <property name="width_request">475</property> <property name="can_focus">False</property> <property name="border_width">5</property> <property name="title" translatable="yes">Description</property> - <property name="resizable">False</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox5"> @@ -446,6 +440,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">•</property> + <property name="width_chars">55</property> <property name="invisible_char_set">True</property> </object> <packing> @@ -461,7 +456,6 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Description</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">desc_entry</property> </object> <packing> <property name="expand">False</property> @@ -470,12 +464,20 @@ </packing> </child> <child> - <object class="GtkTextView" id="desc_entry"> - <property name="height_request">88</property> + <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="vadjustment">adjustment1</property> - <property name="wrap_mode">word</property> + <property name="vscrollbar_policy">always</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTextView" id="desc_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="vadjustment">adjustment1</property> + <property name="wrap_mode">word</property> + <property name="buffer">textbuffer1</property> + </object> + </child> </object> <packing> <property name="expand">True</property> @@ -503,4 +505,11 @@ <property name="step_increment">1</property> <property name="page_increment">10</property> </object> + <object class="GtkTextBuffer" id="textbuffer1"> + <property name="text"> + + + +</property> + </object> </interface> |