Changeset 84596 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 28, 2020 3:01:49 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp
r84587 r84596 232 232 QAccessible::installFactory(UIAccessibilityInterfaceForUIChooserView::pFactory); 233 233 234 /* Prepare everything: */ 235 prepareThis(); 236 prepareWidget(); 237 238 /* Update everything: */ 239 updateSceneRect(); 240 updateSearchWidgetGeometry(); 241 242 /* Apply language settings: */ 243 retranslateUi(); 244 } 245 246 void UIChooserView::prepareThis() 247 { 234 248 /* Prepare palette: */ 235 preparePalette(); 236 237 /* Setup frame: */ 249 QPalette pal = qApp->palette(); 250 const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110); 251 pal.setColor(QPalette::Base, bodyColor); 252 setPalette(pal); 253 254 /* Prepare frame: */ 238 255 setFrameShape(QFrame::NoFrame); 239 256 setFrameShadow(QFrame::Plain); 240 257 setAlignment(Qt::AlignLeft | Qt::AlignTop); 241 258 242 /* Setupscroll-bars policy: */259 /* Prepare scroll-bars policy: */ 243 260 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 244 261 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 245 246 /* Create the search widget (hidden): */ 262 } 263 264 void UIChooserView::prepareWidget() 265 { 266 /* Create the search widget (initially hidden): */ 247 267 m_pSearchWidget = new UIChooserSearchWidget(this); 248 268 if (m_pSearchWidget) … … 256 276 this, &UIChooserView::sltHandleSearchWidgetVisibilityToggle); 257 277 } 258 259 /* Update scene rectangle: */260 updateSceneRect();261 /* Update the location and size of the search widget: */262 updateSearchWidgetGeometry();263 264 /* Apply language settings: */265 retranslateUi();266 }267 268 void UIChooserView::preparePalette()269 {270 QPalette pal = qApp->palette();271 const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);272 pal.setColor(QPalette::Base, bodyColor);273 setPalette(pal);274 278 } 275 279 … … 281 285 emit sigResized(); 282 286 283 /* Update scene rectangle: */287 /* Update everything: */ 284 288 updateSceneRect(); 285 /* Update search widget geometry: */286 289 updateSearchWidgetGeometry(); 287 290 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.h
r84587 r84596 45 45 public: 46 46 47 /** Constructs a Chooser-view passing @a pParent to the base-class. 48 * @param pParent Brings the chooser container to embed into. */ 47 /** Constructs a Chooser-view passing @a pParent to the base-class. */ 49 48 UIChooserView(QWidget *pParent); 50 49 … … 63 62 /** Makes search widget @a fVisible. */ 64 63 void setSearchWidgetVisible(bool fVisible); 64 65 65 /** Updates search widget's results count. 66 66 * @param iTotalMatchCount Brings total search results count. … … 113 113 /** Prepares all. */ 114 114 void prepare(); 115 /** Prepares palette. */ 116 void preparePalette(); 115 /** Prepares this. */ 116 void prepareThis(); 117 /** Prepares widgets. */ 118 void prepareWidget(); 117 119 /** @} */ 118 120
Note:
See TracChangeset
for help on using the changeset viewer.