Changeset 94145 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 9, 2022 8:59:05 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIColorThemeEditor.cpp
r94144 r94145 27 27 28 28 29 UIColorThemeEditor::UIColorThemeEditor(QWidget *pParent /* = 0 */ , bool fWithLabel /* = false */)29 UIColorThemeEditor::UIColorThemeEditor(QWidget *pParent /* = 0 */) 30 30 : QIWithRetranslateUI<QWidget>(pParent) 31 , m_fWithLabel(fWithLabel)32 31 , m_enmValue(UIColorThemeType_Auto) 33 32 , m_pLabel(0) … … 72 71 m_pCombo->setItemText(i, gpConverter->toString(enmType)); 73 72 } 73 m_pCombo->setToolTip(tr("Selects the color theme. It can be Light, Dark or automatically detected (default).")); 74 74 } 75 75 } … … 88 88 { 89 89 pMainLayout->setContentsMargins(0, 0, 0, 0); 90 int iRow = 0;91 90 92 91 /* Create label: */ 93 if (m_fWithLabel) 94 m_pLabel = new QLabel(this); 92 m_pLabel = new QLabel(this); 95 93 if (m_pLabel) 96 pMainLayout->addWidget(m_pLabel, 0, iRow++, 1, 1);94 pMainLayout->addWidget(m_pLabel, 0, 0); 97 95 98 96 /* Create combo layout: */ … … 104 102 if (m_pCombo) 105 103 { 106 setFocusProxy(m_pCombo->focusProxy());107 104 /* This is necessary since contents is dynamical now: */ 108 105 m_pCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents); 109 106 if (m_pLabel) 110 m_pLabel->setBuddy(m_pCombo ->focusProxy());107 m_pLabel->setBuddy(m_pCombo); 111 108 connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 112 109 this, &UIColorThemeEditor::sltHandleCurrentIndexChanged); … … 118 115 119 116 /* Add combo-layout into main-layout: */ 120 pMainLayout->addLayout(pComboLayout, 0, iRow++, 1,1);117 pMainLayout->addLayout(pComboLayout, 0, 1); 121 118 } 122 119 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIColorThemeEditor.h
r94144 r94145 46 46 public: 47 47 48 /** Constructs color theme editor passing @a pParent to the base-class. 49 * @param fWithLabel Brings whether we should add label ourselves. */ 50 UIColorThemeEditor(QWidget *pParent = 0, bool fWithLabel = false); 48 /** Constructs color theme editor passing @a pParent to the base-class. */ 49 UIColorThemeEditor(QWidget *pParent = 0); 51 50 52 51 /** Defines editor @a enmValue. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInterface.cpp
r93818 r94145 57 57 UIGlobalSettingsInterface::UIGlobalSettingsInterface() 58 58 : m_pCache(0) 59 , m_pLabelColorTheme(0)60 59 , m_pEditorColorTheme(0) 61 60 { … … 119 118 void UIGlobalSettingsInterface::retranslateUi() 120 119 { 121 m_pLabelColorTheme->setText(tr("Color &Theme:"));122 m_pEditorColorTheme->setToolTip(tr("Selects the color theme. It can be Light, Dark or automatically detected (default)."));123 120 } 124 121 … … 142 139 if (pLayoutMain) 143 140 { 144 pLayoutMain->setColumnStretch(1, 1);145 141 pLayoutMain->setRowStretch(1, 1); 146 142 147 /* Prepare color-theme label: */148 m_pLabelColorTheme = new QLabel(this);149 if (m_pLabelColorTheme)150 {151 m_pLabelColorTheme->setAlignment(Qt::AlignRight | Qt::AlignVCenter);152 pLayoutMain->addWidget(m_pLabelColorTheme, 0, 0);153 }154 143 /* Prepare color-theme editor: */ 155 144 m_pEditorColorTheme = new UIColorThemeEditor(this); 156 145 if (m_pEditorColorTheme) 157 { 158 m_pLabelColorTheme->setBuddy(m_pEditorColorTheme->focusProxy()); 159 pLayoutMain->addWidget(m_pEditorColorTheme, 0, 1); 160 } 146 pLayoutMain->addWidget(m_pEditorColorTheme, 0, 0); 161 147 } 162 148 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInterface.h
r93990 r94145 80 80 * @{ */ 81 81 /** Holds the color theme label instance. */ 82 QLabel *m_pLabelColorTheme;83 /** Holds the color theme label instance. */84 82 UIColorThemeEditor *m_pEditorColorTheme; 85 83 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.