VirtualBox

Changeset 2311 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 23, 2007 8:51:39 AM (18 years ago)
Author:
vboxsync
Message:

Attempt at the ugly Qt3 toolbars on Mac OS X.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile

    r2240 r2311  
    154154VirtualBox_SOURCES.darwin = \
    155155        src/darwin/DarwinKeyboard.cpp \
    156         src/darwin/DarwinCursor.cpp
     156        src/darwin/DarwinCursor.cpp \
     157        src/darwin/VBoxAquaStyle.cpp
    157158
    158159## @todo how to detect what tool is used?
     
    256257VirtualBox.nls_SOURCES += $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS_QT)))
    257258VirtualBox.nls_MODE = 644
     259
     260
     261#
     262# Testcase for the darwin keyboard routines.
     263#
     264ifdef VBOX_WITH_TESTCASES
     265PROGRAMS.darwin += tstDarwinKeyboard
     266tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
     267tstDarwinKeyboard_INCS = include
     268tstDarwinKeyboard_SOURCES = \
     269        src/darwin/tstDarwinKeyboard.cpp \
     270        src/darwin/DarwinKeyboard.cpp
     271tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon
     272tstDarwinKeyboard_LIBS = \
     273        $(LIB_RUNTIME)
     274endif
    258275
    259276
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxToolBar.h

    r382 r2311  
    2828#include <qmainwindow.h>
    2929#include <qobjectlist.h>
     30#ifdef Q_WS_MAC
     31# include "VBoxAquaStyle.h"
     32#endif
    3033
    3134/**
     
    8891        }
    8992    }
     93
     94#ifdef Q_WS_MAC
     95    /**
     96     * This is a temporary hack, we'll set the style globally later.
     97     */
     98    void setMacStyle()
     99    {
     100        /* self */
     101        QStyle *qs = &VBoxAquaStyle::instance();
     102        setStyle(qs);
     103
     104        /* the buttons */
     105        QObjectList *list = queryList ("QToolButton");
     106        QObjectListIt it (*list);
     107        QObject *obj;
     108        while ((obj = it.current()) != 0)
     109        {
     110            QToolButton *btn = ::qt_cast <QToolButton *> (obj);
     111            btn->setStyle (&VBoxAquaStyle::instance());
     112            ++ it;
     113        }
     114        delete list;
     115
     116        /** @todo the separator */
     117    }
     118#endif
    90119};
    91120
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r2257 r2311  
    485485    vmStartAction->addTo (vmTools);
    486486    vmDiscardAction->addTo (vmTools);
     487#ifdef Q_WS_MAC
     488    vmTools->setMacStyle();
     489#endif
    487490
    488491    /* add actions to menubar */
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h

    r2139 r2311  
    351351    toolBar->addSeparator();
    352352    imRefreshAction->addTo (toolBar);
     353#ifdef Q_WS_MAC
     354    toolBar->setMacStyle();
     355#endif
    353356
    354357
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSnapshotsWgt.ui.h

    r1236 r2311  
    304304    toolBar->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
    305305    VBoxSnapshotsWgtLayout->insertWidget (0, toolBar);
     306#ifdef Q_WS_MAC
     307    toolBar->setMacStyle();
     308#endif
    306309
    307310    /* context menu */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette