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

Unified Diff: xfa/fwl/basewidget/fwl_listboximp.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_comboboximp.cpp ('k') | xfa/fwl/basewidget/fwl_scrollbarimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/basewidget/fwl_listboximp.cpp
diff --git a/xfa/fwl/basewidget/fwl_listboximp.cpp b/xfa/fwl/basewidget/fwl_listboximp.cpp
index 3f658378835761911f91c35916a7e85ee42f4b8d..33a0a8d1ee70baeaa47f62befb1360d9eff80bf8 100644
--- a/xfa/fwl/basewidget/fwl_listboximp.cpp
+++ b/xfa/fwl/basewidget/fwl_listboximp.cpp
@@ -202,10 +202,6 @@ FWL_Error CFWL_ListBoxImp::SetThemeProvider(
IFWL_ThemeProvider* pThemeProvider) {
if (!pThemeProvider)
return FWL_Error::Indefinite;
- if (!pThemeProvider->IsValidWidget(m_pInterface)) {
- m_pScrollBarTP = pThemeProvider;
- return FWL_Error::Succeeded;
- }
m_pProperties->m_pThemeProvider = pThemeProvider;
return FWL_Error::Succeeded;
}
@@ -733,24 +729,16 @@ CFX_SizeF CFWL_ListBoxImp::CalcSize(FX_BOOL bAutoSize) {
int32_t iCount = pData->CountItems(m_pInterface);
for (int32_t i = 0; i < iCount; i++) {
IFWL_ListItem* pItem = pData->GetItem(m_pInterface, i);
- CFWL_ThemePart itemPart;
- itemPart.m_pWidget = m_pInterface;
- itemPart.m_iPart = CFWL_Part::ListItem;
- itemPart.m_pData = m_pProperties->m_pDataProvider;
- itemPart.m_bMaximize = i > 0;
- CFX_RectF r;
- m_pProperties->m_pThemeProvider->GetPartRect(&itemPart, r);
if (!bAutoSize) {
CFX_RectF rtItem;
- rtItem.Set(m_rtClient.left, m_rtClient.top + fs.y, r.width, r.height);
+ rtItem.Set(m_rtClient.left, m_rtClient.top + fs.y, 0, 0);
IFWL_ListBoxDP* pBox =
static_cast<IFWL_ListBoxDP*>(m_pProperties->m_pDataProvider);
pBox->SetItemRect(m_pInterface, pItem, rtItem);
}
- fs.y += r.height;
- if (fs.x < r.width) {
- fs.x = r.width;
- fWidth = r.width;
+ if (fs.x < 0) {
+ fs.x = 0;
+ fWidth = 0;
}
}
} else {
« no previous file with comments | « xfa/fwl/basewidget/fwl_comboboximp.cpp ('k') | xfa/fwl/basewidget/fwl_scrollbarimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698