summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-01-11 13:01:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-01-11 19:42:52 +0000
commit89cb169b49de363ac290c23cb228675d022f5cda (patch)
tree552d2393045b2c5b97fa326a481773345b0673d0 /cui
parentb6f8bc08cdb514639fcc15d6ad76406478e44f54 (diff)
use sizegroups instead of explicit code
Change-Id: I2376e69adf235d1e6f89296c50a9cea76041f9d7
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/chardlg.cxx22
-rw-r--r--cui/uiconfig/ui/charnamepage.ui32
2 files changed, 32 insertions, 22 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index ff52f4068633..123079ba5cde 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -260,20 +260,6 @@ struct SvxCharNamePage_Impl
}
};
-namespace
-{
- void equalize_width_requests(Window *pA, Window *pB, Window *pC)
- {
- long nWidthWest = pA->get_preferred_size().Width();
- long nWidthEast = pB->get_preferred_size().Width();
- long nWidthCTL = pC->get_preferred_size().Width();
- long nLargest = std::max(nWidthWest, std::max(nWidthEast, nWidthCTL));
- pA->set_width_request(nLargest);
- pB->set_width_request(nLargest);
- pC->set_width_request(nLargest);
- }
-}
-
// class SvxCharNamePage -------------------------------------------------
SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet )
@@ -380,10 +366,6 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet )
m_pWestFontStyleLB->set_height_request(nHeight);
m_pWestFontSizeLB->set_height_request(nHeight);
}
- else
- {
- equalize_width_requests(m_pWestFontLanguageLB, m_pEastFontLanguageLB, m_pCTLFontLanguageLB);
- }
Initialize();
}
@@ -1192,10 +1174,6 @@ void SvxCharNamePage::Reset( const SfxItemSet& rSet )
Reset_Impl( rSet, Asian );
Reset_Impl( rSet, Ctl );
- equalize_width_requests(m_pWestFontNameLB, m_pEastFontNameLB, m_pCTLFontNameLB);
- equalize_width_requests(m_pWestFontStyleLB, m_pEastFontStyleLB, m_pCTLFontStyleLB);
- equalize_width_requests(m_pWestFontSizeLB, m_pEastFontSizeLB, m_pCTLFontSizeLB);
-
SetPrevFontWidthScale( rSet );
UpdatePreview_Impl();
}
diff --git a/cui/uiconfig/ui/charnamepage.ui b/cui/uiconfig/ui/charnamepage.ui
index 88202b626f5f..01267b7959a5 100644
--- a/cui/uiconfig/ui/charnamepage.ui
+++ b/cui/uiconfig/ui/charnamepage.ui
@@ -784,4 +784,36 @@
</packing>
</child>
</object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <property name="ignore_hidden">True</property>
+ <widgets>
+ <widget name="westlanglb-cjk"/>
+ <widget name="eastlanglb"/>
+ <widget name="ctllanglb"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup2">
+ <property name="ignore_hidden">True</property>
+ <widgets>
+ <widget name="westfontnameft-cjk"/>
+ <widget name="eastfontnameft"/>
+ <widget name="ctlfontnameft"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup3">
+ <property name="ignore_hidden">True</property>
+ <widgets>
+ <widget name="weststylelb-cjk"/>
+ <widget name="eaststylelb"/>
+ <widget name="ctlstylelb"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup4">
+ <property name="ignore_hidden">True</property>
+ <widgets>
+ <widget name="westsizelb-cjk"/>
+ <widget name="eastsizelb"/>
+ <widget name="ctlsizelb"/>
+ </widgets>
+ </object>
</interface>