VirtualBox

Ignore:
Timestamp:
Aug 3, 2009 10:40:43 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: 3948: Mini-ToolBar for Full-screen & Seamless modes: Option for per-machine toolbar alignment (top & bottom) implemented. Based on user's patch.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h

    r20441 r21938  
    151151    static const char* GUI_SaveMountedAtRuntime;
    152152    static const char* GUI_ShowMiniToolBar;
     153    static const char* GUI_MiniToolBarAlignment;
    153154    static const char* GUI_MiniToolBarAutoHide;
    154155    static const char* GUI_LastCloseAction;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r21842 r21938  
    814814    /* Mini toolbar */
    815815    bool isActive = !(cmachine.GetExtraData (VBoxDefs::GUI_ShowMiniToolBar) == "no");
     816    bool isAtTop = (cmachine.GetExtraData (VBoxDefs::GUI_MiniToolBarAlignment) == "top");
    816817    bool isAutoHide = !(cmachine.GetExtraData (VBoxDefs::GUI_MiniToolBarAutoHide) == "off");
    817818    QList <QMenu*> menus (QList <QMenu*> () << mMiniVMMenu << mDevicesMenu);
    818     mMiniToolBar = new VBoxMiniToolBar (centralWidget(), VBoxMiniToolBar::AlignBottom,
     819    mMiniToolBar = new VBoxMiniToolBar (centralWidget(), isAtTop ? VBoxMiniToolBar::AlignTop : VBoxMiniToolBar::AlignBottom,
    819820                                        isActive, isAutoHide);
    820821    *mMiniToolBar << menus;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxDefs.cpp

    r20441 r21938  
    3333const char* VBoxDefs::GUI_SaveMountedAtRuntime = "GUI/SaveMountedAtRuntime";
    3434const char* VBoxDefs::GUI_ShowMiniToolBar = "GUI/ShowMiniToolBar";
     35const char* VBoxDefs::GUI_MiniToolBarAlignment = "GUI/MiniToolBarAlignment";
    3536const char* VBoxDefs::GUI_MiniToolBarAutoHide = "GUI/MiniToolBarAutoHide";
    3637const char* VBoxDefs::GUI_LastCloseAction = "GUI/LastCloseAction";
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp

    r20412 r21938  
    7474    mCbShowToolBar->setChecked (showMiniToolBar != "no");
    7575
     76    /* Show Mini ToolBar at top */
     77    QString miniToolBarAlignment = mMachine.GetExtraData (VBoxDefs::GUI_MiniToolBarAlignment);
     78    mCbToolBarAlignment->setChecked (miniToolBarAlignment == "top");
     79    mCbToolBarAlignment->setEnabled (mCbShowToolBar->isChecked());
     80
    7681    /* Snapshot folder */
    7782    mPsSnapshot->setPath (aMachine.GetSnapshotFolder());
     
    104109    mMachine.SetExtraData (VBoxDefs::GUI_ShowMiniToolBar,
    105110                           mCbShowToolBar->isChecked() ? "yes" : "no");
     111
     112    /* Show Mini ToolBar at top */
     113    mMachine.SetExtraData (VBoxDefs::GUI_MiniToolBarAlignment,
     114                           mCbToolBarAlignment->isChecked() ? "top" : "bottom");
    106115
    107116    /* Saved state folder */
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsGeneral.ui

    r20412 r21938  
    222222           </widget>
    223223          </item>
     224          <item row="4" column="1" >
     225           <widget class="QCheckBox" name="mCbToolBarAlignment" >
     226            <property name="sizePolicy" >
     227             <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
     228              <horstretch>0</horstretch>
     229              <verstretch>0</verstretch>
     230             </sizepolicy>
     231            </property>
     232            <property name="whatsThis" >
     233             <string>If checked, show the Mini ToolBar at the top of the screen, rather than in it's default position at the bottom of the screen.</string>
     234            </property>
     235            <property name="text" >
     236             <string>Show At &amp;Top Of Screen</string>
     237            </property>
     238            <property name="checked" >
     239             <bool>false</bool>
     240            </property>
     241           </widget>
     242          </item>
    224243         </layout>
    225244        </widget>
     
    278297 </customwidgets>
    279298 <resources/>
    280  <connections/>
     299 <connections>
     300  <connection>
     301   <sender>mCbShowToolBar</sender>
     302   <signal>toggled(bool)</signal>
     303   <receiver>mCbToolBarAlignment</receiver>
     304   <slot>setEnabled(bool)</slot>
     305   <hints>
     306    <hint type="sourcelabel">
     307     <x>195</x>
     308     <y>50</y>
     309    </hint>
     310    <hint type="destinationlabel">
     311     <x>196</x>
     312     <y>72</y>
     313    </hint>
     314   </hints>
     315  </connection>
     316 </connections>
    281317</ui>
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