diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-11-16 10:48:27 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-11-16 12:36:58 +0000 |
commit | 7ac70669da17fd0e8e13986e285b7d3d597ecd69 (patch) | |
tree | 56e59121b638801357ff3e837e39b0f96ac97008 /cui | |
parent | 92da39d5f94c7824099c79c8554cd2b16f0d7929 (diff) |
screenshotannotation: Trim the textfield, add scrollbar
to prevent it from growing too large and thus distorting the dialog
Change-Id: Iaa27d3085ec314246565cae79ab7d627a94a3bff
Reviewed-on: https://gerrit.libreoffice.org/30898
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/screenshotannotationdlg.cxx | 3 | ||||
-rw-r--r-- | cui/uiconfig/ui/screenshotannotationdialog.ui | 15 |
2 files changed, 14 insertions, 4 deletions
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx index 141216081e62..398458df5887 100644 --- a/cui/source/dialogs/screenshotannotationdlg.cxx +++ b/cui/source/dialogs/screenshotannotationdlg.cxx @@ -262,8 +262,9 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl( // copying content to clipboard is allowed if (mpText) { + mpText->set_width_request(400); + mpText->set_height_request( mpText->GetTextHeight() * 10 ); OUString aHelpId = OStringToOUString( mrParentDialog.GetHelpId(), RTL_TEXTENCODING_UTF8 ); - Size aSizeCm = mrParentDialog.PixelToLogic( maParentDialogSize, MapUnit::MapCM ); maMainMarkupText = lcl_ParagraphWithImage( aHelpId, aSizeCm ); mpText->SetText( maMainMarkupText ); diff --git a/cui/uiconfig/ui/screenshotannotationdialog.ui b/cui/uiconfig/ui/screenshotannotationdialog.ui index 76e368b27e2b..e5de9be5a9e1 100644 --- a/cui/uiconfig/ui/screenshotannotationdialog.ui +++ b/cui/uiconfig/ui/screenshotannotationdialog.ui @@ -100,11 +100,20 @@ </packing> </child> <child> - <object class="GtkTextView" id="text"> - <property name="name">text</property> - <property name="height_request">80</property> + <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTextView" id="text:border"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + </object> + </child> </object> <packing> <property name="expand">False</property> |