Lmms: When a daughter window (e.g. Piano Roll, Pitch-bend window) is maximized, it cannot be normalized

Created on 5 Mar 2018  Â·  17Comments  Â·  Source: LMMS/lmms

Edited by @tresf, corrected description

MDI Subwindow controls are hard to see when maximized.
image


LMMS provides a Mximize button for all its daughter windows (e.g. Piano Roll, Pitch-bend window) (See screenshot bellow, with red circle.)
image

If this button is pressed, LMMS maximizes that daughter window. Now this daughter window occupies the entire right side of the main window, and cannot be detached from it. The effect is as if LMMS suddenly switches to modeless.

After this, LMMS does not allow us to make this window a floating window, as before.
Its size control (image) simply vanishes.

gui

Most helpful comment

Perhaps, we could draw a button at this place. This would be a little bit "hacky", but we do this all the time in our subwindows.

All 17 comments

oops. I didn't notice the pair of buttons image for that purpose.

Please close this issue.

You can close issues that you've opened yourself.

This seems to have been introduced with Qt5. I spent a considerable amount of time investigating the restore buttons to no avail: https://github.com/LMMS/lmms/issues/2611#issuecomment-193942180. Help here is appreciated, but I think it's a base Qt5 bug that occurs when running the non-default themes available.

I took a second look after reviewing my screenshots from Windows, Mac and Ubuntu and it appears our theme is influencing it. Here's the main property: style.css:

LmmsPalette {
    /** .... **/
    qproperty-button:  #3f4750;

If we change it to: qproperty-button: #FFFFFF;, it looks like this:
image

Reopening and tagging @Umcaruje. We might be able to workaround this bug.

If we change it to: qproperty-button: #FFFFFF;, it looks like this:

Changing that property also changes other buttons' background color.
I guess the main issue is the background color for QMenuBar(Using LmmsPalette's qproperty-background #262b30) and LmmsPalette's qproperty-background(#3f4750) are hard to distinguish. If changing button's color breaks whole theme, It might be a good chance to change menu bar's background color.

Perhaps, we could draw a button at this place. This would be a little bit "hacky", but we do this all the time in our subwindows.

Proposed a CSS-only fix in #4242

Also realised this problem doesn't exist in the classic theme:
image

image

image

🙄

Haha yeah that's one of the side effects, I'll see to fix those. What's weird is the buttons in the menu are not QPushButtons and I'm not sure what they are exactly, if I find out we could just directly apply CSS to them

@Umcaruje did you mean the white headers of the windows? (I had raised another bug that some dialogs in LMMS have white headers: They do not follow the theme.)

Probably that can also be resolved by Qt code?

(Both the screenshots have white headers.)

How strange that classic does have that button 😕

@raindropsfromsky, Please stop talking about "white headers", this is the Windows 10 default theme.

Then why is it not consistently used in all windows? It is of to see it in
only some places.

On Tue 13 Mar, 2018, 18:03 Tres Finocchiaro, notifications@github.com
wrote:

@raindropsfromsky https://github.com/raindropsfromsky, Please stop
talking about "white headers", this is the Windows 10 default theme.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/LMMS/lmms/issues/4215#issuecomment-372649656, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AIoMgHcIrjVHuUiXB817NlxiCiaLRPoYks5td7ybgaJpZM4Sb-iV
.

@Umcaruje Some more side effects...
filebrowser
sf2dialog

CSS approach seems to bring too many side effects. After some investigation, I found that QProxyStyle::drawComplexControl handles subwindow control drawing and our LmmsStyle reimplements that function.
I guess handling CC_MdiControls in LmmsStyle::drawComplexControl might be an alternative way.

Here's a proof-of-concept codewhich makes subwindow control buttons red.
```diff --git a/src/gui/LmmsStyle.cpp b/src/gui/LmmsStyle.cpp
index b883a2b2f..f48f59eec 100644
--- a/src/gui/LmmsStyle.cpp
+++ b/src/gui/LmmsStyle.cpp
@@ -177,6 +177,14 @@ void LmmsStyle::drawComplexControl( ComplexControl control,
return;
}
}

  • else if (control == CC_MdiControls)
  • {
  • QStyleOptionComplex so(*option);
  • so.palette.setColor(QPalette::Button, QColor(255, 0, 0));
  • QProxyStyle::drawComplexControl(control, &so,
  • painter, widget);
  • return;
  • }
    /* else if( control == CC_ScrollBar )
    {
    painter->fillRect( option->rect, QApplication::palette().color( QPalette::Active,
    ```
Was this page helpful?
0 / 5 - 0 ratings

Related issues

demmm picture demmm  Â·  3Comments

Wallacoloo picture Wallacoloo  Â·  3Comments

Firepal picture Firepal  Â·  3Comments

binyominzeev picture binyominzeev  Â·  3Comments

DomClark picture DomClark  Â·  3Comments