[Libreoffice-commits] core.git: Branch 'feature/aboutconfig' - 2 commits - cui/source
Efe Gürkan YALAMAN
efeyalaman at gmail.com
Sun Jul 7 15:18:29 PDT 2013
cui/source/options/optaboutconfig.cxx | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
New commits:
commit bca3615b8bfca15949ea5e0588763a51226fa50c
Author: Efe Gürkan YALAMAN <efeyalaman at gmail.com>
Date: Mon Jul 8 01:17:03 2013 +0300
Fix for crash on button press.
Change-Id: I80fd5e981b23df04feca39546b9495c686396145
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 3cba370..a130753 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -50,6 +50,7 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( Window* pParent, const SfxItemSet&
CuiAboutConfigTabPage::~CuiAboutConfigTabPage()
{
+ delete pPrefBox;
}
SfxTabPage* CuiAboutConfigTabPage::Create( Window* pParent, const SfxItemSet& rItemSet )
commit 27f65ca9b5daf6cbedcfa54af9f88bc9d3c7686b
Author: Efe Gürkan YALAMAN <efeyalaman at gmail.com>
Date: Thu Jul 4 17:22:12 2013 +0300
Small fix for visible column names
Change-Id: I68a2ced7487f7d16d34475fe69e7fef2550e93e0
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 6a46085..3cba370 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -12,6 +12,11 @@
using namespace svx;
+#define ITEMID_PREF 1
+#define ITEMID_TYPE 2
+#define ITEMID_STATUS 3
+#define ITEMID_VALUE 4
+
CuiAboutConfigTabPage::CuiAboutConfigTabPage( Window* pParent, const SfxItemSet& rItemSet )
:SfxTabPage( pParent, "AboutConfig", "cui/ui/aboutconfigdialog.ui", rItemSet)
{
@@ -24,16 +29,20 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( Window* pParent, const SfxItemSet&
m_pPrefCtrl->set_width_request(aControlSize.Width());
m_pPrefCtrl->set_height_request(aControlSize.Height());
- WinBits nBits = WB_SCROLL | WB_SORT;
+ WinBits nBits = WB_SCROLL | WB_SORT | WB_HSCROLL | WB_VSCROLL;
pPrefBox = new svx::OptHeaderTabListBox( *m_pPrefCtrl, nBits );
- //FIXME use define's for ItemID's, InsertItem(itemID, text, nsize, winbits)
+
HeaderBar &rBar = pPrefBox->GetTheHeaderBar();
- rBar.InsertItem( 1, get<FixedText>("preference")->GetText(), 0, HIB_LEFT | HIB_VCENTER );
- rBar.InsertItem( 2, get<FixedText>("status")->GetText(), 0, HIB_LEFT | HIB_VCENTER );
- rBar.InsertItem( 3, get<FixedText>("type")->GetText(), 0, HIB_LEFT | HIB_VCENTER );
- rBar.InsertItem( 4, get<FixedText>("value")->GetText(), 0, HIB_LEFT | HIB_VCENTER );
- //FIXME this numbers are just for testing purposes implement this better and more dynamic way.
- long aTabs[] = {12,12,12,12};
+ rBar.InsertItem( ITEMID_PREF, get<FixedText>("preference")->GetText(), 0, HIB_LEFT | HIB_VCENTER );
+ rBar.InsertItem( ITEMID_TYPE, get<FixedText>("status")->GetText(), 0, HIB_LEFT | HIB_VCENTER );
+ rBar.InsertItem( ITEMID_STATUS, get<FixedText>("type")->GetText(), 0, HIB_LEFT | HIB_VCENTER );
+ rBar.InsertItem( ITEMID_VALUE, get<FixedText>("value")->GetText(), 0, HIB_LEFT | HIB_VCENTER );
+
+ long aTabs[] = {4,0,12,12,12};
+
+ aTabs[2] += aTabs[1] + rBar.GetTextWidth(rBar.GetItemText(1));
+ aTabs[3] += aTabs[2] + rBar.GetTextWidth(rBar.GetItemText(2));
+ aTabs[4] += aTabs[3] + rBar.GetTextWidth(rBar.GetItemText(3));
pPrefBox->SetTabs(aTabs, MAP_PIXEL);
More information about the Libreoffice-commits
mailing list