[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jul 19 11:43:28 UTC 2018
cui/source/dialogs/cuicharmap.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 5e5e49eba37c15b17a4d9788da91415abbca4eb1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 19 10:10:33 2018 +0100
Commit: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Thu Jul 19 13:43:07 2018 +0200
tdf#117038 set button width to max possible content width
Change-Id: I97e7c27523d213cb06cdf87a8ed0124d1ea8d5ba
Reviewed-on: https://gerrit.libreoffice.org/57718
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 678bddee71e3..d65ec3fe1926 100755
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -493,6 +493,14 @@ void SvxCharacterMap::init()
m_xHexCodeText->connect_changed( LINK( this, SvxCharacterMap, HexCodeChangeHdl ) );
m_xFavouritesBtn->connect_clicked( LINK(this, SvxCharacterMap, FavSelectHdl));
+ // tdf#117038 set the buttons width to its max possible width so it doesn't
+ // make layout change when the label changes
+ m_xFavouritesBtn->set_label(CuiResId(RID_SVXSTR_REMOVE_FAVORITES));
+ auto nMaxWidth = m_xFavouritesBtn->get_preferred_size().Width();
+ m_xFavouritesBtn->set_label(CuiResId(RID_SVXSTR_ADD_FAVORITES));
+ nMaxWidth = std::max(nMaxWidth, m_xFavouritesBtn->get_preferred_size().Width());
+ m_xFavouritesBtn->set_size_request(nMaxWidth, -1);
+
if( SvxShowCharSet::getSelectedChar() == ' ')
{
m_xOKBtn->set_sensitive(false);
@@ -560,7 +568,7 @@ void SvxCharacterMap::setFavButtonState(const OUString& sTitle, const OUString&
else
m_xFavouritesBtn->set_sensitive(true);
- if(isFavChar(sTitle, rFont))
+ if (isFavChar(sTitle, rFont))
{
m_xFavouritesBtn->set_label(CuiResId(RID_SVXSTR_REMOVE_FAVORITES));
}
More information about the Libreoffice-commits
mailing list