[Libreoffice-commits] core.git: include/svtools sd/source sfx2/source svtools/source sw/source
Caolán McNamara
caolanm at redhat.com
Fri Oct 11 12:22:46 PDT 2013
include/svtools/treelistbox.hxx | 2 ++
sd/source/ui/animations/CustomAnimationList.cxx | 2 +-
sfx2/source/dialog/templdlg.cxx | 2 +-
svtools/source/contnr/svimpbox.cxx | 8 ++++++--
sw/source/ui/fldui/flddinf.cxx | 2 +-
5 files changed, 11 insertions(+), 5 deletions(-)
New commits:
commit d61168908ced2e4bae32b8e0ae0a6eba6dbf37fc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 11 20:15:15 2013 +0100
have another shot at placing the expander checkitem optimally
reverts 03569dc7d38e4edf3f3e50f7dff3252116c28ab1 "I hate the positioning of the
expander checkitem in hierarchical view". I still hate it, so merge together
the various places where different efforts are made to try and position the
checkitem optimally and provide a single central place to do that.
Change-Id: I047504945fb5bf94e5f451007eb74328b8b56785
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 404689a..2fb4dcd 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -686,6 +686,8 @@ public:
Size GetOutputSizePixel() const;
short GetIndent() const { return nIndent; }
void SetIndent( short nIndent );
+ // Place the expander checkitem at the optimal indent for hierarchical lists
+ void SetOptimalImageIndent() { SetIndent(12); }
void SetSpaceBetweenEntries( short nSpace );
short GetSpaceBetweenEntries() const {return nEntryHeightOffs;}
Point GetEntryPosition( SvTreeListEntry* ) const;
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index ec76175..4bbcccb 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -464,7 +464,7 @@ CustomAnimationList::CustomAnimationList( ::Window* pParent )
EnableContextMenuHandling();
SetSelectionMode( MULTIPLE_SELECTION );
- SetIndent(16);
+ SetOptimalImageIndent();
SetNodeDefaultImages();
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index c882ab9..3d067e2 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1855,7 +1855,7 @@ void SfxCommonTemplateDialog_Impl::EnableHierarchical(bool const bEnable)
LINK(this, SfxCommonTemplateDialog_Impl, ApplyHdl));
((StyleTreeListBox_Impl*)pTreeBox)->
SetDropHdl(LINK(this, SfxCommonTemplateDialog_Impl, DropHdl));
- pTreeBox->SetIndent(10);
+ pTreeBox->SetOptimalImageIndent();
FillTreeBox();
SelectStyle(aSelectEntry);
pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST).toString());
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index f950f0e..0099dd2 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -1602,8 +1602,12 @@ void SvImpLBox::SetNodeBmpYOffset( const Image& rBmp )
void SvImpLBox::SetNodeBmpTabDistance()
{
nNodeBmpTabDistance = -pView->GetIndent();
- Size aSize = GetExpandedNodeBmp().GetSizePixel();
- nNodeBmpTabDistance -= aSize.Width() / 2;
+ if( pView->nContextBmpWidthMax )
+ {
+ // only if the first dynamic tab is centered (we currently assume that)
+ Size aSize = GetExpandedNodeBmp().GetSizePixel();
+ nNodeBmpTabDistance -= aSize.Width() / 2;
+ }
}
//
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 7cf2d5b..f5bdf1d 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -71,7 +71,7 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pParent, const SfxItemSet& rCoreSet)
m_pTypeTLB->SetSelectionMode(SINGLE_SELECTION);
m_pTypeTLB->SetStyle(m_pTypeTLB->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
- m_pTypeTLB->SetIndent(10);
+ m_pTypeTLB->SetOptimalImageIndent();
// Don't set font, so that the control's font is adobted!
// Otherwise at wrong font bug to OV.
m_pTypeTLB->SetSpaceBetweenEntries(0);
More information about the Libreoffice-commits
mailing list