Changeset 103069 in vbox
- Timestamp:
- Jan 25, 2024 4:04:33 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIWelcomePane.cpp
r103068 r103069 78 78 { 79 79 /* Translate greetings text: */ 80 m_pLabelGreetings->setText(tr("<h3>Welcome to VirtualBox!</h3>" 81 "<p>The left part of application window contains global tools and " 82 "lists all virtual machines and virtual machine groups on your computer. " 83 "You can import, add and create new VMs using corresponding toolbar buttons. " 84 "You can popup a tools of currently selected element using corresponding element button.</p>" 85 "<p>You can press the <b>%1</b> key to get instant help, or visit " 86 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 87 "for more information and latest news.</p>") 88 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 80 if (m_pLabelGreetings) 81 m_pLabelGreetings->setText(tr("<h3>Welcome to VirtualBox!</h3>" 82 "<p>The left part of application window contains global tools and " 83 "lists all virtual machines and virtual machine groups on your computer. " 84 "You can import, add and create new VMs using corresponding toolbar buttons. " 85 "You can popup a tools of currently selected element using corresponding element " 86 "button.</p>" 87 "<p>You can press the <b>%1</b> key to get instant help, or visit " 88 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 89 "for more information and latest news.</p>") 90 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 89 91 } 90 92 … … 100 102 101 103 /* Prepare main layout: */ 102 Q VBoxLayout *pMainLayout = new QVBoxLayout(this);104 QHBoxLayout *pMainLayout = new QHBoxLayout(this); 103 105 if (pMainLayout) 104 106 { 105 107 /* Prepare welcome layout: */ 106 Q HBoxLayout *pLayoutWelcome = new QHBoxLayout;108 QVBoxLayout *pLayoutWelcome = new QVBoxLayout; 107 109 if (pLayoutWelcome) 108 110 { 109 111 const int iL = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 2; 112 #ifdef VBOX_WS_MAC 113 const int iSpacing = 20; 114 #else 115 const int iSpacing = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing); 116 #endif 110 117 pLayoutWelcome->setContentsMargins(iL, 0, 0, 0); 118 pLayoutWelcome->setSpacing(iSpacing); 111 119 112 120 /* Prepare greetings label: */ … … 119 127 } 120 128 121 /* Prepare icon label: */ 122 m_pLabelIcon = new QLabel(this); 123 if (m_pLabelIcon) 124 { 125 m_pLabelIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 126 127 /* Add into layout: */ 128 pLayoutWelcome->addWidget(m_pLabelIcon); 129 pLayoutWelcome->setAlignment(m_pLabelIcon, Qt::AlignHCenter | Qt::AlignTop); 130 } 129 /* Add stretch: */ 130 pLayoutWelcome->addStretch(); 131 131 132 132 /* Add into layout: */ … … 134 134 } 135 135 136 /* Add stretch: */ 137 pMainLayout->addStretch(); 136 /* Prepare icon label: */ 137 m_pLabelIcon = new QLabel(this); 138 if (m_pLabelIcon) 139 { 140 m_pLabelIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 141 142 /* Add into layout: */ 143 pMainLayout->addWidget(m_pLabelIcon); 144 pMainLayout->setAlignment(m_pLabelIcon, Qt::AlignHCenter | Qt::AlignTop); 145 } 138 146 } 139 147 … … 164 172 { 165 173 /* Assign corresponding icon: */ 166 if (!m_icon.isNull() )174 if (!m_icon.isNull() && m_pLabelIcon) 167 175 { 168 176 /* Check which size goes as the default one: */
Note:
See TracChangeset
for help on using the changeset viewer.