TabItem.cxx (ff12d537) | TabItem.cxx (b9e67834) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 11 unchanged lines hidden (view full) --- 20 *************************************************************/ 21 22#include "precompiled_sfx2.hxx" 23 24#include "TabItem.hxx" 25 26#include "DrawHelper.hxx" 27#include "Paint.hxx" | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 11 unchanged lines hidden (view full) --- 20 *************************************************************/ 21 22#include "precompiled_sfx2.hxx" 23 24#include "TabItem.hxx" 25 26#include "DrawHelper.hxx" 27#include "Paint.hxx" |
28#include "Theme.hxx" | 28#include "sfx2/sidebar/Theme.hxx" |
29 30using namespace ::com::sun::star; 31using namespace ::com::sun::star::uno; 32 33 34namespace sfx2 { namespace sidebar { 35 36 37TabItem::TabItem (Window* pParentWindow) 38 : ImageRadioButton(pParentWindow), 39 mbIsLeftButtonDown(false), 40 mePaintType(PT_Theme) 41{ | 29 30using namespace ::com::sun::star; 31using namespace ::com::sun::star::uno; 32 33 34namespace sfx2 { namespace sidebar { 35 36 37TabItem::TabItem (Window* pParentWindow) 38 : ImageRadioButton(pParentWindow), 39 mbIsLeftButtonDown(false), 40 mePaintType(PT_Theme) 41{ |
42 SetBackground(Theme::GetTabBarBackground().GetWallpaper()); | 42 SetBackground(Theme::GetPaint(Theme::Paint_TabBarBackground).GetWallpaper()); |
43} 44 45 46 47 48TabItem::~TabItem (void) 49{ 50} --- 9 unchanged lines hidden (view full) --- 60 default: 61 { 62 const bool bIsSelected (IsChecked()); 63 const bool bIsMouseOver (IsMouseOver()); 64 DrawHelper::DrawRoundedRectangle( 65 *this, 66 Rectangle(Point(0,0), GetSizePixel()), 67 2, | 43} 44 45 46 47 48TabItem::~TabItem (void) 49{ 50} --- 9 unchanged lines hidden (view full) --- 60 default: 61 { 62 const bool bIsSelected (IsChecked()); 63 const bool bIsMouseOver (IsMouseOver()); 64 DrawHelper::DrawRoundedRectangle( 65 *this, 66 Rectangle(Point(0,0), GetSizePixel()), 67 2, |
68 bIsMouseOver||bIsSelected ? Theme::GetTabItemBorderColor() : Color(0xffffffff), 69 bIsMouseOver ? Theme::GetTabItemBackgroundPaint() : sidebar::Paint()); | 68 bIsMouseOver||bIsSelected ? Theme::GetColor(Theme::Color_TabItemBorder) : Color(0xffffffff), 69 bIsMouseOver ? Theme::GetPaint(Theme::Paint_TabItemBackground) : sidebar::Paint()); |
70 71 const Image aIcon (Button::GetModeImage(Theme::IsHighContrastMode() 72 ? BMP_COLOR_HIGHCONTRAST 73 : BMP_COLOR_NORMAL)); 74 const Size aIconSize (aIcon.GetSizePixel()); 75 const Point aIconLocation( 76 (GetSizePixel().Width() - aIconSize.Width())/2, 77 (GetSizePixel().Height() - aIconSize.Height())/2); --- 74 unchanged lines hidden --- | 70 71 const Image aIcon (Button::GetModeImage(Theme::IsHighContrastMode() 72 ? BMP_COLOR_HIGHCONTRAST 73 : BMP_COLOR_NORMAL)); 74 const Size aIconSize (aIcon.GetSizePixel()); 75 const Point aIconLocation( 76 (GetSizePixel().Width() - aIconSize.Width())/2, 77 (GetSizePixel().Height() - aIconSize.Height())/2); --- 74 unchanged lines hidden --- |