Changeset 13631 in vbox
- Timestamp:
- Oct 28, 2008 4:02:24 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 38557
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxUtils.h
r12829 r13631 27 27 #include <QMouseEvent> 28 28 #include <QWidget> 29 #include <QText Edit>29 #include <QTextBrowser> 30 30 31 31 /** … … 108 108 }; 109 109 110 /** 111 * QTextBrowser reimplementation to feat some extended requirements. 112 */ 113 class QRichTextBrowser : public QTextBrowser 114 { 115 Q_OBJECT; 116 117 public: 118 119 QRichTextBrowser (QWidget *aParent) : QTextBrowser (aParent) {} 120 121 void setViewportMargins (int aLeft, int aTop, int aRight, int aBottom) 122 { 123 QTextBrowser::setViewportMargins (aLeft, aTop, aRight, aBottom); 124 } 125 }; 126 110 127 #ifdef Q_WS_MAC 111 128 # undef PAGE_SIZE -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r13580 r13631 33 33 #include "VBoxVMLogViewer.h" 34 34 #include "VBoxGlobal.h" 35 #include "VBoxUtils.h" 35 36 36 37 #ifdef Q_WS_X11 … … 101 102 void createErrPage(); 102 103 103 Q TextBrowser *mDetailsText;104 QRichTextBrowser *mDetailsText; 104 105 105 106 QWidget *mErrBox; … … 121 122 /* create normal details page */ 122 123 123 mDetailsText = new QTextBrowser (mErrBox); 124 mDetailsText = new QRichTextBrowser (mErrBox); 125 mDetailsText->setViewportMargins (10, 10, 10, 10); 124 126 mDetailsText->setFocusPolicy (Qt::StrongFocus); 125 127 mDetailsText->document()->setDefaultStyleSheet ("a { text-decoration: none; }"); … … 454 456 mHelpActions.setup (this); 455 457 456 /* subwidgets */457 458 /* central widget & horizontal layout */458 /* Subwidgets */ 459 460 /* Central widget @ vertical layout */ 459 461 setCentralWidget (new QWidget (this)); 460 QHBoxLayout *centralLayout = 461 new QHBoxLayout (centralWidget()); 462 463 /* left vertical box */ 464 QVBoxLayout *leftVLayout = new QVBoxLayout (); 465 /* right vertical box */ 466 QVBoxLayout *rightVLayout = new QVBoxLayout (); 467 centralLayout->addLayout (leftVLayout, 1); 468 centralLayout->addLayout (rightVLayout, 2); 462 QVBoxLayout *centralLayout = new QVBoxLayout (centralWidget()); 463 464 /* Pane horizontal layout */ 465 QHBoxLayout *paneLayout = new QHBoxLayout(); 469 466 470 467 /* VM list toolbar */ 471 468 VBoxToolBar *vmTools = new VBoxToolBar (this); 469 470 /* Left vertical box */ 471 QVBoxLayout *leftVLayout = new QVBoxLayout(); 472 paneLayout->addLayout (leftVLayout, 1); 473 474 /* Right vertical box */ 475 QVBoxLayout *rightVLayout = new QVBoxLayout(); 476 paneLayout->addLayout (rightVLayout, 2); 477 472 478 #if MAC_LEOPARD_STYLE 473 479 /* Enable unified toolbars on Mac OS X. Available on Qt >= 4.3 */ … … 476 482 /* No spacing/margin on the mac */ 477 483 VBoxGlobal::setLayoutMargin (centralLayout, 0); 484 VBoxGlobal::setLayoutMargin (paneLayout, 0); /* Dsen to NaN: Is it necessary? */ 478 485 leftVLayout->setSpacing (0); 479 486 rightVLayout->setSpacing (0); 480 rightVLayout->insertSpacing (0, 10);487 // rightVLayout->insertSpacing (0, 10); /* Dsen to NaN: Is it necessary anymore? */ 481 488 #else /* MAC_LEOPARD_STYLE */ 482 leftVLayout->addWidget(vmTools); 483 centralLayout->setSpacing (9); 489 centralLayout->addWidget (vmTools); 490 centralLayout->setSpacing (5); 491 paneLayout->setSpacing (9); 484 492 VBoxGlobal::setLayoutMargin (centralLayout, 5); 485 493 leftVLayout->setSpacing (5); … … 487 495 #endif /* MAC_LEOPARD_STYLE */ 488 496 497 /* Inserting pane layout */ 498 centralLayout->addLayout (paneLayout); 499 489 500 /* VM list view */ 490 501 mVMListView = new VBoxVMListView(); 491 mVMModel = new VBoxVMModel (mVMListView);502 mVMModel = new VBoxVMModel (mVMListView); 492 503 mVMListView->setModel (mVMModel); 493 504 … … 495 506 496 507 /* VM tab widget containing details and snapshots tabs */ 497 vmTabWidget = new QTabWidget 508 vmTabWidget = new QTabWidget(); 498 509 rightVLayout->addWidget (vmTabWidget); 499 510 500 511 /* VM details view */ 501 vmDetailsView = new VBoxVMDetailsView (NULL, 502 vmRefreshAction); 512 vmDetailsView = new VBoxVMDetailsView (NULL, vmRefreshAction); 503 513 vmTabWidget->addTab (vmDetailsView, 504 514 VBoxGlobal::iconSet (":/settings_16px.png"), 505 515 QString::null); 506 vmDetailsView->setContentsMargins (10, 10, 10, 10);507 516 508 517 /* VM snapshots list */ … … 535 544 vmTools->addAction (vmStartAction); 536 545 vmTools->addAction (vmDiscardAction); 546 vmTools->addSeparator(); 547 vmTools->addAction (vmPauseAction); 548 vmTools->addSeparator(); 549 vmTools->addAction (vmRefreshAction); 550 vmTools->addSeparator(); 551 vmTools->addAction (vmShowLogsAction); 537 552 538 553 /* add actions to menubar */
Note:
See TracChangeset
for help on using the changeset viewer.