Changeset 31059 in vbox
- Timestamp:
- Jul 23, 2010 1:09:33 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/vm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsSF.cpp
r31002 r31059 235 235 } 236 236 237 void VBoxVMSettingsSF::resizeEvent (QResizeEvent *aEvent) 238 { 239 adjustList(); 240 } 241 237 242 void VBoxVMSettingsSF::getFromGlobal() 238 243 { … … 477 482 void VBoxVMSettingsSF::adjustList() 478 483 { 479 /* Calculating required columns size & watching those columns (0 and 2) to feat 1/3 of total width. */ 484 /* 485 * Calculates required columns sizes to max out column 2 486 * and let all other columns stay at their minimum sizes. 487 * 488 * Columns 489 * 0 = Tree view 490 * 1 = Shared Folder name 491 * 2 = Auto-mount flag 492 * 3 = Writable flag 493 */ 480 494 QAbstractItemView *itemView = mTwFolders; 481 495 QHeaderView *itemHeader = mTwFolders->header(); 482 496 int total = mTwFolders->viewport()->width(); 497 483 498 int mw0 = qMax (itemView->sizeHintForColumn (0), itemHeader->sectionSizeHint (0)); 484 499 int mw2 = qMax (itemView->sizeHintForColumn (2), itemHeader->sectionSizeHint (2)); 485 int w0 = mw0 < total / 3 ? mw0 : total / 3; 486 int w2 = mw2 < total / 3 ? mw2 : total / 3; 500 int mw3 = qMax (itemView->sizeHintForColumn (3), itemHeader->sectionSizeHint (3)); 501 502 int w0 = mw0 < total / 4 ? mw0 : total / 4; 503 int w2 = mw2 < total / 4 ? mw2 : total / 4; 504 int w3 = mw3 < total / 4 ? mw3 : total / 4; 487 505 488 506 /* Giving 1st column all the available space. */ 489 507 mTwFolders->setColumnWidth (0, w0); 490 mTwFolders->setColumnWidth (1, total - w0 - w2 );508 mTwFolders->setColumnWidth (1, total - w0 - w2 - w3); 491 509 mTwFolders->setColumnWidth (2, w2); 510 mTwFolders->setColumnWidth (3, w3); 492 511 } 493 512 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsSF.h
r31002 r31059 79 79 private: 80 80 81 void resizeEvent (QResizeEvent *aEvent); 82 81 83 void showEvent (QShowEvent *aEvent); 82 84
Note:
See TracChangeset
for help on using the changeset viewer.