- Timestamp:
- Apr 19, 2007 4:58:31 PM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile
r2178 r2240 68 68 include/QIRichLabel.h \ 69 69 include/VMGlobalSettings.h \ 70 include/VBoxUtils.h \ 70 71 include/VBoxGlobal.h \ 71 72 include/VBoxVMListBox.h \ -
trunk/src/VBox/Frontends/VirtualBox/src/QIRichLabel.cpp
r1467 r2240 169 169 updateLabel (osh); 170 170 171 if (baseheight == 0) 171 if ((int)baseheight < heightForWidth (width())) 172 { 172 173 baseheight = heightForWidth (width()); 173 if ((int)baseheight < heightForWidth (width()))174 QFrame::setFixedHeight (heightForWidth (width()));175 else176 174 QFrame::setFixedHeight (baseheight); 175 } 177 176 emit textChanged(); 178 177 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r2185 r2240 980 980 break; 981 981 } 982 case QEvent::Show:983 {984 /// @todo improve985 #if 0986 /* Constrain StartVM button size */987 QObjectList *list = queryList ("QToolButton",988 QString (vmStartAction->name()) + "_action_button");989 QToolButton *actionButton = list->first() ?990 static_cast<QToolButton*> (list->first()) : 0;991 if (actionButton)992 new QIConstraintKeeper (actionButton);993 #endif994 break;995 }996 982 997 983 default: -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui
r2187 r2240 1082 1082 </hbox> 1083 1083 </widget> 1084 <widget class="QLabel" row="2" column="1">1085 <property name="name">1086 <cstring>whatsThisLabel</cstring>1087 </property>1088 <property name="sizePolicy">1089 <sizepolicy>1090 <hsizetype>7</hsizetype>1091 <vsizetype>0</vsizetype>1092 <horstretch>0</horstretch>1093 <verstretch>0</verstretch>1094 </sizepolicy>1095 </property>1096 <property name="backgroundMode">1097 <enum>PaletteMidlight</enum>1098 </property>1099 <property name="frameShape">1100 <enum>Box</enum>1101 </property>1102 <property name="frameShadow">1103 <enum>Sunken</enum>1104 </property>1105 <property name="margin">1106 <number>7</number>1107 </property>1108 <property name="scaledContents">1109 <bool>false</bool>1110 </property>1111 <property name="alignment">1112 <set>WordBreak|AlignJustify|AlignTop</set>1113 </property>1114 </widget>1115 1084 </grid> 1116 1085 </widget> … … 1238 1207 <include location="local" impldecl="in implementation">VBoxProblemReporter.h</include> 1239 1208 <include location="local" impldecl="in implementation">VBoxUSBFilterSettings.h</include> 1209 <include location="local" impldecl="in implementation">QIRichLabel.h</include> 1240 1210 </includes> 1241 1211 <forwards> 1242 1212 <forward>class VBoxUSBMenu</forward> 1213 <forward>class QIRichLabel</forward> 1243 1214 </forwards> 1244 1215 <variables> … … 1256 1227 <variable access="private">VBoxUSBMenu *usbDevicesMenu;</variable> 1257 1228 <variable access="private">bool mLanguageChanged;</variable> 1229 <variable access="private">QIRichLabel *whatsThisLabel;</variable> 1258 1230 </variables> 1259 1231 <slots> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui.h
r2154 r2240 198 198 199 199 QListViewItem::paintCell (aPainter, aGroup, aColumn, aWidth, aAlign); 200 200 201 201 if (mBuiltIn) 202 202 { … … 288 288 connect (whatsThisTimer, SIGNAL (timeout()), this, SLOT (updateWhatsThis())); 289 289 whatsThisCandidate = NULL; 290 whatsThisLabel->setMinimumHeight (whatsThisLabel->frameWidth() * 2 + 290 291 whatsThisLabel = new QIRichLabel (this, "whatsThisLabel"); 292 VBoxGlobalSettingsDlgLayout->addWidget (whatsThisLabel, 2, 1); 293 294 whatsThisLabel->setFocusPolicy (QWidget::NoFocus); 295 whatsThisLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed); 296 whatsThisLabel->setBackgroundMode (QLabel::PaletteMidlight); 297 whatsThisLabel->setFrameShape (QLabel::Box); 298 whatsThisLabel->setFrameShadow (QLabel::Sunken); 299 whatsThisLabel->setMargin (7); 300 whatsThisLabel->setScaledContents (FALSE); 301 whatsThisLabel->setAlignment (int (QLabel::WordBreak | 302 QLabel::AlignJustify | 303 QLabel::AlignTop)); 304 305 whatsThisLabel->setFixedHeight (whatsThisLabel->frameWidth() * 2 + 291 306 6 /* seems that RichText adds some margin */ + 292 307 whatsThisLabel->fontMetrics().lineSpacing() * 3); -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui
r2187 r2240 2819 2819 <slot>cdMediaChanged()</slot> 2820 2820 <slot>fdMediaChanged()</slot> 2821 <slot>processAdjustSize()</slot>2822 2821 <slot>updateInterfaces( QWidget* )</slot> 2823 2822 <slot>networkPageUpdate( QWidget* )</slot> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
r2187 r2240 419 419 420 420 whatsThisLabel->setFixedHeight (whatsThisLabel->frameWidth() * 2 + 421 422 421 6 /* seems that RichText adds some margin */ + 422 whatsThisLabel->fontMetrics().lineSpacing() * 3); 423 423 whatsThisLabel->setMinimumWidth (whatsThisLabel->frameWidth() * 2 + 424 424 6 /* seems that RichText adds some margin */ + 425 425 whatsThisLabel->fontMetrics().width ('m') * 40); 426 /// @todo possibly, remove after QIConstraintKeeper is properly done427 connect (whatsThisLabel, SIGNAL (textChanged()), this, SLOT (processAdjustSize()));428 426 429 427 /* … … 799 797 800 798 VBoxGlobal::centerWidget (this, parentWidget()); 801 802 /// @todo improve 803 #if 0 804 new QIConstraintKeeper (whatsThisLabel); 805 #endif 806 } 807 808 /// @todo possibly, remove after QIConstraintKeeper is properly done 809 /// (should be at least possible to move this functionality into it) 810 void VBoxVMSettingsDlg::processAdjustSize() 811 { 812 int newHeight = minimumSize().height(); 813 int oldHeight = height(); 814 if (newHeight > oldHeight) 815 resize (minimumSize()); 816 } 799 } 817 800 818 801 void VBoxVMSettingsDlg::updateShortcuts()
Note:
See TracChangeset
for help on using the changeset viewer.