Changeset 10228 in vbox
- Timestamp:
- Jul 4, 2008 1:54:09 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 32816
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxToolBar.h
r9797 r10228 27 27 #include <QToolBar> 28 28 #include <QMainWindow> 29 #ifdef Q_WS_MAC 30 //# include "VBoxAquaStyle.h" 31 #endif 29 30 /* Note: This styles are available on _all_ platforms. */ 31 #include <QCleanlooksStyle> 32 #include <QWindowsStyle> 32 33 33 34 /** … … 48 49 if (layout()) 49 50 layout()->setContentsMargins (0, 0, 0, 0);; 50 #ifdef Q_WS_WIN 51 52 setContextMenuPolicy (Qt::NoContextMenu); 53 51 54 /* Remove that ugly frame panel around the toolbar. */ 52 setStyleSheet ("QToolBar { border: 0px none black; }"); 53 #endif // Q_WS_WIN 55 /* I'm not sure if we should do this generally on linux for that mass 56 * of KDE styles. But maybe some of them are based on CleanLooks so 57 * they are looking ok also. */ 58 QStyle *style = NULL; 59 if (!style) 60 /* Check for cleanlooks style */ 61 style = qobject_cast<QCleanlooksStyle*> (QToolBar::style()); 62 if (!style) 63 /* Check for windows style */ 64 style = qobject_cast<QWindowsStyle*> (QToolBar::style()); 65 if (style) 66 setStyleSheet ("QToolBar { border: 0px none black; }"); 54 67 } 68 55 69 56 70 /** … … 82 96 } 83 97 84 #ifdef Q_WS_MAC85 /**86 * This is a temporary hack, we'll set the style globally later.87 */88 //#warning port me89 void setMacStyle()90 {91 /* self */92 // QStyle *qs = &VBoxAquaStyle::instance();93 // setStyle(qs);94 //95 // /* the buttons */96 // QObjectList *list = queryList ("QToolButton");97 // QObjectListIt it (*list);98 // QObject *obj;99 // while ((obj = it.current()) != 0)100 // {101 // QToolButton *btn = ::qt_cast <QToolButton *> (obj);102 // btn->setStyle (&VBoxAquaStyle::instance());103 // ++ it;104 // }105 // delete list;106 107 /** @todo the separator */108 }109 #endif110 111 98 private: 112 99
Note:
See TracChangeset
for help on using the changeset viewer.