diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-04-24 22:12:37 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-04-25 08:39:38 +0200 |
commit | fad98c8641342a77241124dd98e0cb781daef4ad (patch) | |
tree | fadb5c9694876fb03fe46a798a6a8926bf7192b5 /sc | |
parent | e1ebb5cb58edc325bb30bb5eb992665fb861960f (diff) |
tdf#124572 TabBar new look, protected icon, width and height
This is the first try of a new TabBar look - borders have been
removed, selected tab doesn't change the font to bold, adjustment
to the selected tab line.
Width and height of a tab item has been adjusted to make it
better to fit the icons in and to not be so cramped.
Draw "protected" status of an tab icon (in Calc) as an icon and
not as a unicode glyph.
Change-Id: If2ee930a573343166fbe9efcd94ae5159a620f22
Reviewed-on: https://gerrit.libreoffice.org/71238
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/tabview.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 1014de5bdfb4..95d0b9a4e876 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -62,7 +62,7 @@ #define SPLIT_MARGIN 30 #define SPLIT_HANDLE_SIZE 5 -#define WIDTH_MARGIN 5 +constexpr sal_Int32 TAB_HEIGHT_MARGIN = 10; #define SC_ICONSIZE 36 @@ -358,7 +358,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner ) Size aFontSize = rStyleSettings.GetTabFont().GetFontSize(); MapMode aPtMapMode(MapUnit::MapPoint); aFontSize = pFrameWin->LogicToPixel(aFontSize, aPtMapMode); - sal_Int32 nTabWidth = aFontSize.Height() + WIDTH_MARGIN; + sal_Int32 nTabHeight = aFontSize.Height() + TAB_HEIGHT_MARGIN; if ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ) { @@ -393,7 +393,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner ) } if (bHScroll) { - nBarY = nTabWidth; + nBarY = nTabHeight; if (!mbInlineWithScrollbar) nBarY += nScrollBarSize; @@ -484,7 +484,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner ) else { Point aTabPoint(nPosX, nPosY + nSizeY + nScrollBarSize); - Size aTabSize(nSizeX, nTabWidth); + Size aTabSize(nSizeX, nTabHeight); lcl_SetPosSize(*pTabControl, aTabPoint, aTabSize, nTotalWidth, bLayoutRTL); pTabControl->SetSheetLayoutRTL(bLayoutRTL); @@ -622,7 +622,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner ) nSplitPosX = aViewData.GetHSplitPos(); lcl_SetPosSize( *pHSplitter, Point(nSplitPosX, nOutPosY), - Size( nSplitSizeX, nSplitHeight - nTabWidth ), nTotalWidth, bLayoutRTL ); + Size(nSplitSizeX, nSplitHeight - nTabHeight), nTotalWidth, bLayoutRTL); nLeftSize = nSplitPosX - nPosX; nSplitPosX += nSplitSizeX; nRightSize = nSizeX - nLeftSize - nSplitSizeX; |