DeckLayouter.cxx (f120fe41) | DeckLayouter.cxx (54eaaa32) |
---|---|
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 --- 203 unchanged lines hidden (view full) --- 212 Panel& rPanel (*iItem->mpPanel); 213 214 // Separator above the panel title bar. 215 aSeparators.push_back(nY); 216 nY += nDeckSeparatorHeight; 217 218 // Place the title bar. 219 TitleBar* pTitleBar = rPanel.GetTitleBar(); | 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 --- 203 unchanged lines hidden (view full) --- 212 Panel& rPanel (*iItem->mpPanel); 213 214 // Separator above the panel title bar. 215 aSeparators.push_back(nY); 216 nY += nDeckSeparatorHeight; 217 218 // Place the title bar. 219 TitleBar* pTitleBar = rPanel.GetTitleBar(); |
220 pTitleBar->SetPosSizePixel(0, nY, nWidth, nPanelTitleBarHeight); 221 pTitleBar->Show(); 222 nY += nPanelTitleBarHeight; | 220 if (pTitleBar != NULL) 221 { 222 if (iItem->mbShowTitleBar) 223 { 224 pTitleBar->SetPosSizePixel(0, nY, nWidth, nPanelTitleBarHeight); 225 pTitleBar->Show(); 226 nY += nPanelTitleBarHeight; |
223 | 227 |
224 // Separator below the panel title bar. 225 aSeparators.push_back(nY); 226 nY += nDeckSeparatorHeight; | 228 // Separator below the panel title bar. 229 aSeparators.push_back(nY); 230 nY += nDeckSeparatorHeight; 231 } 232 else 233 { 234 pTitleBar->Hide(); 235 } 236 } |
227 228 if (rPanel.IsExpanded()) 229 { 230 rPanel.Show(); 231 232 // Determine the height of the panel depending on layout 233 // mode and distributed heights. 234 sal_Int32 nPanelHeight (0); --- 44 unchanged lines hidden (view full) --- 279 rAvailableHeight = rContentBox.GetHeight(); 280 281 const sal_Int32 nPanelTitleBarHeight (Theme::GetInteger(Theme::Int_PanelTitleBarHeight)); 282 const sal_Int32 nDeckSeparatorHeight (Theme::GetInteger(Theme::Int_DeckSeparatorHeight)); 283 284 IterateLayoutItems(iItem,rLayoutItems) 285 { 286 ui::LayoutSize aLayoutSize (ui::LayoutSize(0,0,0)); | 237 238 if (rPanel.IsExpanded()) 239 { 240 rPanel.Show(); 241 242 // Determine the height of the panel depending on layout 243 // mode and distributed heights. 244 sal_Int32 nPanelHeight (0); --- 44 unchanged lines hidden (view full) --- 289 rAvailableHeight = rContentBox.GetHeight(); 290 291 const sal_Int32 nPanelTitleBarHeight (Theme::GetInteger(Theme::Int_PanelTitleBarHeight)); 292 const sal_Int32 nDeckSeparatorHeight (Theme::GetInteger(Theme::Int_DeckSeparatorHeight)); 293 294 IterateLayoutItems(iItem,rLayoutItems) 295 { 296 ui::LayoutSize aLayoutSize (ui::LayoutSize(0,0,0)); |
287 if (iItem->mpPanel != NULL) | 297 if (iItem->mpPanel != NULL) |
288 { | 298 { |
289 rAvailableHeight -= nPanelTitleBarHeight; 290 rAvailableHeight -= 2*nDeckSeparatorHeight; 291 | 299 if (rLayoutItems.size() == 1 300 && iItem->mpPanel->IsTitleBarOptional()) 301 { 302 // There is only one panel and its title bar is 303 // optional => hide it. 304 rAvailableHeight -= nDeckSeparatorHeight; 305 iItem->mbShowTitleBar = false; 306 } 307 else 308 { 309 // Show the title bar and a separator above and below 310 // the title bar. 311 rAvailableHeight -= nPanelTitleBarHeight; 312 rAvailableHeight -= 2*nDeckSeparatorHeight; 313 } 314 |
292 if (iItem->mpPanel->IsExpanded()) 293 { 294 Reference<ui::XSidebarPanel> xPanel (iItem->mpPanel->GetPanelComponent()); 295 if (xPanel.is()) 296 aLayoutSize = xPanel->getHeightForWidth(rContentBox.GetWidth()); 297 else 298 aLayoutSize = ui::LayoutSize(MinimalPanelHeight, 0, -1); 299 } --- 199 unchanged lines hidden --- | 315 if (iItem->mpPanel->IsExpanded()) 316 { 317 Reference<ui::XSidebarPanel> xPanel (iItem->mpPanel->GetPanelComponent()); 318 if (xPanel.is()) 319 aLayoutSize = xPanel->getHeightForWidth(rContentBox.GetWidth()); 320 else 321 aLayoutSize = ui::LayoutSize(MinimalPanelHeight, 0, -1); 322 } --- 199 unchanged lines hidden --- |