Cool!triplus wrote:Improved workbench activation detection
- Improved workbench activation detection (issue reported by pablogil))
- Bar mode: option to enable/disable selector menu
- Bar mode: option to move selector menu to the end
- ToolBar mode: option to move selector menu to the end
- ToolBar mode: Quick Menu and Selector button now follow set style (Icon and text, Icon, Text)
- Don't set workbench QAction object name (avoid duplicates)
- Changed Toolbar preferences selector menu button default menu pop-up mode
TabBar
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: TabBar
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: TabBar
Hi @triplustriplus wrote:Qt uses toolbar object name itself to identify toolbars.
I found that in your TabBar macro you have this code:
Code: Select all
def singleInstance():
from PySide import QtGui
mw = FreeCADGui.getMainWindow()
if mw:
for i in mw.findChildren(QtGui.QDockWidget):
if i.objectName() == "TabBar":
i.deleteLater()
singleInstance()
is there a way to list the QWidget windows names?
if i.e. there is this QWidget open
http://www.freecadweb.org/wiki/index.ph ... w_Rotation
is there a way to list its name and avoid a multiple instance?
thanks
Maurice
Re: TabBar
Replace the last line:
With this:
Code: Select all
rotate = rotate_gui()
Code: Select all
def singleInstance():
app = QtGui.qApp
for i in app.topLevelWidgets():
if i.objectName() == "MacroViewRotation":
i.deleteLater()
else:
pass
singleInstance()
rotate = rotate_gui()
rotate.setObjectName("MacroViewRotation")
Re: TabBar
it works like a charm!triplus wrote:Replace the last line:
Code: Select all
rotate = rotate_gui()
With this:
thanks a lot!
Maurice
Re: TabBar
You're welcome.easyw-fc wrote:it works like a charm!triplus wrote:Replace the last line:
Code: Select all
rotate = rotate_gui()
With this:
thanks a lot!
Maurice
P.S. As for the TabBar development status update. Currently i am investing free time in achieving first release of the PieMenu. After i will finish the mentioned and already started work on the TabBar.
Re: TabBar
Hi @triplus,
I had finally time to finish a default style for your TabBar, it may combine perfectly with almost any FreeCAD stylesheet or with any default OS style.
Right now I'm using it but placing the code inside a stylesheet, it would be nice if you can include it inside the widget and apply it as an addition to the style that user has selected.
Some examples: The only element that I feel like it impossible to match with the user selected stylesheet or OS style is the one that set the active workbench, that is QToolBar#TabBar QToolButton:checked so I think it would be very smart if you add color and background-color for that element inside TabBar Preferences so that people can freely set it as they want to, is that possible and loadable?
Well, here you have the code:
I had finally time to finish a default style for your TabBar, it may combine perfectly with almost any FreeCAD stylesheet or with any default OS style.
Right now I'm using it but placing the code inside a stylesheet, it would be nice if you can include it inside the widget and apply it as an addition to the style that user has selected.
Some examples: The only element that I feel like it impossible to match with the user selected stylesheet or OS style is the one that set the active workbench, that is QToolBar#TabBar QToolButton:checked so I think it would be very smart if you add color and background-color for that element inside TabBar Preferences so that people can freely set it as they want to, is that possible and loadable?
Well, here you have the code:
Code: Select all
/*==================================================================================================
TABBAR widget stylesheet (by Pablo Gil)
==================================================================================================*/
QToolBar:horizontal#TabBar,
QToolBar:vertical#TabBar {
background-color: rgba(0,0,0,120);
margin: 0px;
padding: 0px;
}
QToolBar::handle:top#TabBar,
QToolBar::handle:bottom#TabBar,
QToolBar::handle:horizontal#TabBar {
alignment: bottom left;
}
QToolBar::handle:left#TabBar,
QToolBar::handle:right#TabBar,
QToolBar::handle:vertical#TabBar {
width: 100%;
alignment: center left;
}
QToolBar:top#TabBar QToolButton,
QToolBar:bottom#TabBar QToolButton,
QToolBar:horizontal#TabBar QToolButton {
alignment: bottom left;
}
QToolBar:left#TabBar QToolButton,
QToolBar:right#TabBar QToolButton,
QToolBar:vertical#TabBar QToolButton {
alignment: center left;
}
QToolButton[toolbar_orientation="horizontal"] {
/* nothing, when Horizontal there's no need to add special parameters */
}
QToolButton[toolbar_orientation="vertical"] {
width: 100%;
}
QToolBar#TabBar QToolButton {
border: none;
margin: 0px;
padding: 2px 6px;
border-radius: 0px;
}
QToolBar#TabBar QToolButton:checked {
color: white;
/* if default background color doesn't contrast or if you want to add your preferred one */
/*background-color: red;*/
}
QToolBar#TabBar QToolButton:!checked {
background-color: transparent;
margin: 0px;
}
QToolBar#TabBar QToolButton:!checked:hover {
background-color: rgba(255,255,255,20);
}
QToolBar#TabBar QToolButton:!checked:pressed {
background-color: rgba(255,255,255,40);
}
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: TabBar
Hi @pablogil and thanks for taking the initiative and for the effort.
The current plan is to make first release of PieMenu working on all supported platforms. After to create first release of persistent toolbars. After TabBar will be developed further. This hasn't been decided yet but i feel i could create separate project just for the selector toolbar in the future and to remove this feature from TabBar. About the style i will probably use it one way or another and will get back to you after development on TabBar will start again and i will evaluate the options.
The current plan is to make first release of PieMenu working on all supported platforms. After to create first release of persistent toolbars. After TabBar will be developed further. This hasn't been decided yet but i feel i could create separate project just for the selector toolbar in the future and to remove this feature from TabBar. About the style i will probably use it one way or another and will get back to you after development on TabBar will start again and i will evaluate the options.
Re: TabBar
Great, I will stay tunned
I find a good idea to turn workbench selector a standalone widget as it, by itself, is so useful and self explanatory (if naming it something like "workbench tab").
Meanwhile I will enjoy your work with Pie Menu which you already know I'm also very interested on
I find a good idea to turn workbench selector a standalone widget as it, by itself, is so useful and self explanatory (if naming it something like "workbench tab").
Meanwhile I will enjoy your work with Pie Menu which you already know I'm also very interested on
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: TabBar
When it comes to finalizing TabBar development. It will happen in 2 phases.
Phase 1:
Move some of the TabBar functionality into standalone modules:
Remove mentioned functionality from TabBar and simplify the remaining TabBar code base. To finish all of the toolbar related things on my todo list i started with selector toolbar.
Phase 1:
Move some of the TabBar functionality into standalone modules:
- Selector toolbar
- Command panel
- Autoload
Remove mentioned functionality from TabBar and simplify the remaining TabBar code base. To finish all of the toolbar related things on my todo list i started with selector toolbar.
Re: TabBar
Hi triplus,
Thanks for this fresh, interesting and new interface.
I tested it and have some suggestion:
* An option to turn all toolbars (outside tabbar) for all workbenches at the same off. I had to go through all wbs and turn toolbars (in selector menu... not sure ... Toolbars ->Off)
* in Draft wb some of the toolbars resist against swichting them off. E.g. 'Draft snap' I select them to hide as mentioned above and after swichting to another wb and back they are again visiblle.
* How about Separators to visually group the filled in toolbars. Otherwise I am lost in to many equally visualized icons. Maybe I did not used it right.
* Is it possible to use this in fullscreen, like autohide it on the upper edge of the screen? Would be really nice
BR,
HoWil
Thanks for this fresh, interesting and new interface.
I tested it and have some suggestion:
* An option to turn all toolbars (outside tabbar) for all workbenches at the same off. I had to go through all wbs and turn toolbars (in selector menu... not sure ... Toolbars ->Off)
* in Draft wb some of the toolbars resist against swichting them off. E.g. 'Draft snap' I select them to hide as mentioned above and after swichting to another wb and back they are again visiblle.
* How about Separators to visually group the filled in toolbars. Otherwise I am lost in to many equally visualized icons. Maybe I did not used it right.
* Is it possible to use this in fullscreen, like autohide it on the upper edge of the screen? Would be really nice
BR,
HoWil