diff --git a/src/Mod/Tux/NavigationIndicatorGui.py b/src/Mod/Tux/NavigationIndicatorGui.py index c49048c42c..4ed56845a2 100644 --- a/src/Mod/Tux/NavigationIndicatorGui.py +++ b/src/Mod/Tux/NavigationIndicatorGui.py @@ -53,6 +53,7 @@ class IndicatorButton(QtGui.QPushButton): if event.type() == QtCore.QEvent.LanguageChange: retranslateUi() onTooltip() + adjustSize() return super(IndicatorButton, self).changeEvent(event) @@ -74,21 +75,21 @@ def retranslateUi(): t0 = translate("NavigationIndicator", "Navigation style not recognized.") global t1 - t1 = "

OpenInventor " + text06 + """

+ t1 = "

Blender " + text06 + """

- + - - - - - + + + + +
""" + text01 + """ """ + text02 + """""" + text02 + """ """ + text03 + """ """ + text04 + """""" + text04 + """
""" + text08 + ": " + text10 + "

" @@ -114,122 +115,7 @@ def retranslateUi(): """ + text08 + ": " + text10 + "

" global t3 - t3 = "

Revit " + text06 + """

- - - - - - - - - - - - - - - -
""" + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """
- """ + text08 + ": " + text10 + "

" - - global t4 - t4 = "

Blender " + text06 + """

- - - - - - - - - - - - - - - -
""" + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """
- """ + text08 + ": " + text10 + "

" - - global t5 - t5 = "

MayaGesture " + text06 + """

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
""" + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text05 + """
""" + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """""" + text05 + """
-

""" + text02 + ": " + text07 + """
- """ + text08 + ": " + text09 + "

" - - global t6 - t6 = "

Touchpad " + text06 + """

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
""" + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text03 + """""" + text04 + """
""" + text01 + """""" + text02 + """""" + text03 + """""" + text03 + """""" + text04 + """
-

""" + text02 + ": " + text07 + "

" - - global t7 - t7 = "

Gesture " + text06 + """

+ t3 = "

Gesture " + text06 + """

@@ -267,8 +153,47 @@ def retranslateUi():

""" + text02 + ": " + text07 + """
""" + text08 + ": " + text09 + "

" - global t8 - t8 = "

OpenCascade " + text06 + """

+ global t4 + t4 = "

MayaGesture " + text06 + """

+
""" + text01 + """
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
""" + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text05 + """
""" + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """""" + text05 + """
+

""" + text02 + ": " + text07 + """
+ """ + text08 + ": " + text09 + "

" + + global t5 + t5 = "

OpenCascade " + text06 + """

@@ -288,8 +213,28 @@ def retranslateUi():
""" + text01 + """
""" - global t9 - t9 = "

OpenSCAD " + text06 + """

+ global t6 + t6 = "

OpenInventor " + text06 + """

+ + + + + + + + + + + + + + + +
""" + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text04 + """
+ """ + text08 + ": " + text10 + "

" + + global t7 + t7 = "

OpenSCAD " + text06 + """

@@ -307,8 +252,28 @@ def retranslateUi():
""" + text01 + """
""" - global t10 - t10 = "

TinkerCAD " + text06 + """

+ global t8 + t8 = "

Revit " + text06 + """

+ + + + + + + + + + + + + + + +
""" + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """
+ """ + text08 + ": " + text10 + "

" + + global t9 + t9 = "

TinkerCAD " + text06 + """

@@ -324,6 +289,42 @@ def retranslateUi():
""" + text01 + """
""" + global t10 + t10 = "

Touchpad " + text06 + """

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
""" + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text03 + """""" + text04 + """
""" + text01 + """""" + text02 + """""" + text03 + """""" + text03 + """""" + text04 + """
+

""" + text02 + ": " + text07 + "

" + menuSettings.setTitle(translate("NavigationIndicator", "Settings")) menuOrbit.setTitle(translate("NavigationIndicator", "Orbit style")) aCompact.setText(translate("NavigationIndicator", "Compact")) @@ -335,6 +336,7 @@ def retranslateUi(): indicator = IndicatorButton(statusBar) indicator.setFlat(True) +indicator.adjustSize() indicator.setObjectName("NavigationIndicator") menu = QtGui.QMenu(indicator) @@ -369,68 +371,68 @@ gStyle = QtGui.QActionGroup(menu) a0 = QtGui.QAction(gStyle) a0.setIcon(QtGui.QIcon(":/icons/NavigationUndefined.svg")) -a0.setData("Undefined") +a0.setData("Undefined ") a0.setObjectName("Indicator_NavigationUndefined") a1 = QtGui.QAction(gStyle) -a1.setIcon(QtGui.QIcon(":/icons/NavigationOpenInventor_dark.svg")) -a1.setText("OpenInventor") -a1.setData("Gui::InventorNavigationStyle") -a1.setObjectName("Indicator_NavigationOpenInventor") +a1.setIcon(QtGui.QIcon(":/icons/NavigationBlender_dark.svg")) +a1.setText("Blender ") +a1.setData("Gui::BlenderNavigationStyle") +a1.setObjectName("Indicator_NavigationBlender") a2 = QtGui.QAction(gStyle) a2.setIcon(QtGui.QIcon(':/icons/NavigationCAD_dark.svg')) -a2.setText("CAD") +a2.setText("CAD ") a2.setData("Gui::CADNavigationStyle") a2.setObjectName("Indicator_NavigationCAD") a3 = QtGui.QAction(gStyle) -a3.setIcon(QtGui.QIcon(":/icons/NavigationRevit_dark.svg")) -a3.setText("Revit") -a3.setData("Gui::RevitNavigationStyle") -a3.setObjectName("Indicator_NavigationRevit") +a3.setIcon(QtGui.QIcon(":/icons/NavigationGesture_dark.svg")) +a3.setText("Gesture ") +a3.setData("Gui::GestureNavigationStyle") +a3.setObjectName("Indicator_NavigationGesture") a4 = QtGui.QAction(gStyle) -a4.setIcon(QtGui.QIcon(":/icons/NavigationBlender_dark.svg")) -a4.setText("Blender") -a4.setData("Gui::BlenderNavigationStyle") -a4.setObjectName("Indicator_NavigationBlender") +a4.setIcon(QtGui.QIcon(":/icons/NavigationMayaGesture_dark.svg")) +a4.setText("MayaGesture ") +a4.setData("Gui::MayaGestureNavigationStyle") +a4.setObjectName("Indicator_NavigationMayaGesture") a5 = QtGui.QAction(gStyle) -a5.setIcon(QtGui.QIcon(":/icons/NavigationMayaGesture_dark.svg")) -a5.setText("MayaGesture") -a5.setData("Gui::MayaGestureNavigationStyle") -a5.setObjectName("Indicator_NavigationMayaGesture") +a5.setIcon(QtGui.QIcon(":/icons/NavigationOpenCascade_dark.svg")) +a5.setText("OpenCascade ") +a5.setData("Gui::OpenCascadeNavigationStyle") +a5.setObjectName("Indicator_NavigationOpenCascade") a6 = QtGui.QAction(gStyle) -a6.setIcon(QtGui.QIcon(":/icons/NavigationTouchpad_dark.svg")) -a6.setText("Touchpad") -a6.setData("Gui::TouchpadNavigationStyle") -a6.setObjectName("Indicator_NavigationTouchpad") +a6.setIcon(QtGui.QIcon(":/icons/NavigationOpenInventor_dark.svg")) +a6.setText("OpenInventor ") +a6.setData("Gui::InventorNavigationStyle") +a6.setObjectName("Indicator_NavigationOpenInventor") a7 = QtGui.QAction(gStyle) -a7.setIcon(QtGui.QIcon(":/icons/NavigationGesture_dark.svg")) -a7.setText("Gesture") -a7.setData("Gui::GestureNavigationStyle") -a7.setObjectName("Indicator_NavigationGesture") +a7.setIcon(QtGui.QIcon(":/icons/NavigationOpenSCAD_dark.svg")) +a7.setText("OpenSCAD ") +a7.setData("Gui::OpenSCADNavigationStyle") +a7.setObjectName("Indicator_NavigationOpenSCAD") a8 = QtGui.QAction(gStyle) -a8.setIcon(QtGui.QIcon(":/icons/NavigationOpenCascade_dark.svg")) -a8.setText("OpenCascade") -a8.setData("Gui::OpenCascadeNavigationStyle") -a8.setObjectName("Indicator_NavigationOpenCascade") +a8.setIcon(QtGui.QIcon(":/icons/NavigationRevit_dark.svg")) +a8.setText("Revit ") +a8.setData("Gui::RevitNavigationStyle") +a8.setObjectName("Indicator_NavigationRevit") a9 = QtGui.QAction(gStyle) -a9.setIcon(QtGui.QIcon(":/icons/NavigationOpenSCAD_dark.svg")) -a9.setText("OpenSCAD") -a9.setData("Gui::OpenSCADNavigationStyle") -a9.setObjectName("Indicator_NavigationOpenSCAD") +a9.setIcon(QtGui.QIcon(":/icons/NavigationTinkerCAD_dark.svg")) +a9.setText("TinkerCAD ") +a9.setData("Gui::TinkerCADNavigationStyle") +a9.setObjectName("Indicator_NavigationTinkerCAD") a10 = QtGui.QAction(gStyle) -a10.setIcon(QtGui.QIcon(":/icons/NavigationTinkerCAD_dark.svg")) -a10.setText("TinkerCAD") -a10.setData("Gui::TinkerCADNavigationStyle") -a10.setObjectName("Indicator_NavigationTinkerCAD") +a10.setIcon(QtGui.QIcon(":/icons/NavigationTouchpad_dark.svg")) +a10.setText("Touchpad ") +a10.setData("Gui::TouchpadNavigationStyle") +a10.setObjectName("Indicator_NavigationTouchpad") menu.addMenu(menuSettings) menu.addSeparator() @@ -465,6 +467,7 @@ def setCompact(action): indicator.setText("") else: indicator.setText(action.text()) + indicator.adjustSize() def onTooltip(): @@ -557,7 +560,7 @@ def setCurrent(): pass else: s = True - setCompact(a2) + setCompact(a2) # set to style CAD menu.setDefaultAction(a2) indicator.setIcon(a2.icon()) indicator.setToolTip(a2.toolTip())