-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Allow skin styles for sidebar context menu #2297
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for investigate this.
The solution looks good and I have left some comments.
src/library/library.cpp
Outdated
@@ -240,6 +241,8 @@ void Library::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) { | |||
pSidebarWidget->slotSetFont(m_trackTableFont); | |||
connect(this, SIGNAL(setTrackTableFont(QFont)), | |||
pSidebarWidget, SLOT(slotSetFont(QFont))); | |||
m_pSetlogFeature->bindSidebarWidget(pSidebarWidget); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead if name ach feature individual, you can use a loop over m_features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, indeed. The entire feature section can be optimized. There's a related ToDo from @rryan about that, but I didn't look into it, yet.
res/skins/Tango/style.qss
Outdated
@@ -2083,11 +2083,56 @@ WTrackProperty#SamplerTitle_mini { | |||
###### Misc ################################################## | |||
##############################################################*/ | |||
|
|||
QToolTip { | |||
QToolTip, | |||
QMenu { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this still work with #2238? Do you need to style CueMenu and ColorMenu in addition to QMenu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works, see the screenshot in the PR description which I composed from the hotcue label branch and this branch.
There are a few minor adjustments necessary though.
The LateNight screenshot only shows that it works in general, I'll take care of the other skins and the fine tuning when #2238 is merged
Some merge conflicts have developed. Is this still a WIP? |
My next step is to aply the solution for AutoDJ & History feature also to other features that have a sidebar context menu. |
yes: I still need to implement the solution for AutoDJ, Playlists & Crates. |
…r-qmenu-styling
I guess I can revert 6d9cb58 "default m_pMenu to nullptr", right? |
The menu now looks nice for all library features, and also for the hotcue menu #2238 |
QMenu contextMenu; | ||
contextMenu.addMenu(&crateMenu); | ||
contextMenu.exec(globalPos); | ||
m_pMenu->addMenu(m_pCrateMenu); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change m_pMenu
to m_pCrateMenu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and there are more build errors in library.c
around line 132 "BrowseFeature"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for AutoDJ crateMenu
leftover was the issue.
m_pMenu
and m_pCrateMenu
are correct
m_pBrowseFeature
is also fixed now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx!
nice
|
I really don't have any idea how to accomplish this. |
…r-qmenu-styling
The menus in Deere do now show any indicator for submenus. |
yeah I know.. this is still WIP. I stumble over many issues, also unrelated to this PR, especially with scaled Library widgets. |
Also this has grown beyond 'simply styling the menus'. I tried to match WEffectSelector and QToolTip and QMenu (in various places: hotcues, library header, tracks, sidebar, cover art, editlines), and by fixing all those incosistencies (besides the scaling issues with fonts and library controls) this PR is now kind of a GUI round-house kick. @daschuer Please check the library in Shade. I dimmed the table header buttons and IMO all color schemes are much more pleasant now. |
Did anyone ever try (or has any hints on how) to style the main menu bar? Btw: I still need help with passing sidebar widget to the baseexternallibraryfeature to style the iTunes and Banshee menu |
5bf4147
to
9821062
Compare
Haa! Got it, I think. |
I tested the suggested parent approach
That said, I'll have to try something else. |
I think I've found a way to address the external features, as well. |
Thanks for your help! |
Closed and split up:
Skins styles: #2337
C++ changes: #2338
IMO the right-click menus like in Tracks, sidebar and cover art are an annoying issue because the (often ugly) OS themes crashes into our designed Mixxx skins.
For Tracks and cover art a custom style can be applied by addressing
QMenu
andQMenu QCheckBox
.To make this work for the library sidebar context menu, too, I set the sidebar widget as parent for each library feature's context menus. For now, I did this for History and Computer feature.
Please check if this is the right approach, then I'll add this to the other features as well. (I need to clean up a bit anyway)
Also I removed a c++ stylesheet for the Tracks > Crates menu. This allows to override the OS styled checkboxes in the Crates menu, as well.