Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: xfa/fwl/theme/cfwl_scrollbartp.cpp

Issue 2422373002: Cleanup unneeded FWL theme code. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/theme/cfwl_scrollbartp.h ('k') | xfa/fwl/theme/cfwl_widgettp.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/theme/cfwl_scrollbartp.h" 7 #include "xfa/fwl/theme/cfwl_scrollbartp.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_scrollbar.h" 9 #include "xfa/fwl/basewidget/ifwl_scrollbar.h"
10 #include "xfa/fwl/core/cfwl_themebackground.h" 10 #include "xfa/fwl/core/cfwl_themebackground.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 void* CFWL_ScrollBarTP::GetCapacity(CFWL_ThemePart* pThemePart, 31 void* CFWL_ScrollBarTP::GetCapacity(CFWL_ThemePart* pThemePart,
32 CFWL_WidgetCapacity dwCapacity) { 32 CFWL_WidgetCapacity dwCapacity) {
33 if (dwCapacity == CFWL_WidgetCapacity::Size) { 33 if (dwCapacity == CFWL_WidgetCapacity::Size) {
34 m_fValue = 5; 34 m_fValue = 5;
35 return &m_fValue; 35 return &m_fValue;
36 } 36 }
37 return CFWL_WidgetTP::GetCapacity(pThemePart, dwCapacity); 37 return CFWL_WidgetTP::GetCapacity(pThemePart, dwCapacity);
38 } 38 }
39 uint32_t CFWL_ScrollBarTP::SetThemeID(IFWL_Widget* pWidget, 39 uint32_t CFWL_ScrollBarTP::SetThemeID(IFWL_Widget* pWidget,
40 uint32_t dwThemeID, 40 uint32_t dwThemeID) {
41 FX_BOOL bChildren) {
42 if (m_pThemeData) 41 if (m_pThemeData)
43 SetThemeData(FWL_GetThemeColor(dwThemeID)); 42 SetThemeData(FWL_GetThemeColor(dwThemeID));
44 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); 43 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID);
45 } 44 }
46 FX_BOOL CFWL_ScrollBarTP::DrawBackground(CFWL_ThemeBackground* pParams) { 45 FX_BOOL CFWL_ScrollBarTP::DrawBackground(CFWL_ThemeBackground* pParams) {
47 if (!pParams) 46 if (!pParams)
48 return FALSE; 47 return FALSE;
49 IFWL_Widget* pWidget = pParams->m_pWidget; 48 IFWL_Widget* pWidget = pParams->m_pWidget;
50 FWLTHEME_STATE eState = FWLTHEME_STATE_Normal; 49 FWLTHEME_STATE eState = FWLTHEME_STATE_Normal;
51 if (pParams->m_dwStates & CFWL_PartState_Hovered) 50 if (pParams->m_dwStates & CFWL_PartState_Hovered)
52 eState = FWLTHEME_STATE_Hover; 51 eState = FWLTHEME_STATE_Hover;
53 else if (pParams->m_dwStates & CFWL_PartState_Pressed) 52 else if (pParams->m_dwStates & CFWL_PartState_Pressed)
54 eState = FWLTHEME_STATE_Pressed; 53 eState = FWLTHEME_STATE_Pressed;
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 m_pThemeData->clrBtnBorder[1] = ArgbEncode(0xff, 218, 230, 254); 292 m_pThemeData->clrBtnBorder[1] = ArgbEncode(0xff, 218, 230, 254);
294 m_pThemeData->clrPawColorLight[2] = ArgbEncode(0xff, 207, 221, 253); 293 m_pThemeData->clrPawColorLight[2] = ArgbEncode(0xff, 207, 221, 253);
295 m_pThemeData->clrPawColorDark[2] = ArgbEncode(0xff, 131, 158, 216); 294 m_pThemeData->clrPawColorDark[2] = ArgbEncode(0xff, 131, 158, 216);
296 m_pThemeData->clrBtnBK[2][0] = ArgbEncode(0xff, 167, 190, 245); 295 m_pThemeData->clrBtnBK[2][0] = ArgbEncode(0xff, 167, 190, 245);
297 m_pThemeData->clrBtnBK[2][1] = ArgbEncode(0xff, 146, 179, 249); 296 m_pThemeData->clrBtnBK[2][1] = ArgbEncode(0xff, 146, 179, 249);
298 m_pThemeData->clrBtnBorder[2] = ArgbEncode(0xff, 124, 159, 211); 297 m_pThemeData->clrBtnBorder[2] = ArgbEncode(0xff, 124, 159, 211);
299 m_pThemeData->clrTrackBKStart = ArgbEncode(0xff, 243, 241, 236); 298 m_pThemeData->clrTrackBKStart = ArgbEncode(0xff, 243, 241, 236);
300 m_pThemeData->clrTrackBKEnd = ArgbEncode(0xff, 254, 254, 251); 299 m_pThemeData->clrTrackBKEnd = ArgbEncode(0xff, 254, 254, 251);
301 } 300 }
302 } 301 }
OLDNEW
« no previous file with comments | « xfa/fwl/theme/cfwl_scrollbartp.h ('k') | xfa/fwl/theme/cfwl_widgettp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698