Page 1 of 1

Userwindows Border Colors

Posted: Fri Jul 24, 2020 2:15 pm
by Jaren
Is there any way to change the default white border color of the userwindows? If not, is there a way to change the border size? I saw that Adjustable Containers can do this but they do not have the functionality I am looking for. BTW I am really digging these new features.

Re: Userwindows Border Colors

Posted: Fri Jul 24, 2020 2:23 pm
by Vadi
I think both settings are controlled by Windows/macOS/Linux here, not Mudlet. Try changing the theme and you'll see this change too.

Re: Userwindows Border Colors

Posted: Fri Jul 24, 2020 2:41 pm
by Jaren
Ah ok, thanks for the info.

Re: Userwindows Border Colors

Posted: Wed Aug 26, 2020 7:06 am
by Alyven
It is possible to change the border settings for QDockWidgets (which includes UserWindows) by using ProfileStyleSheet.
try this (ugly) example.

Code: Select all

setProfileStyleSheet(
  [[QDockWidget{
    border: 20px solid green;
    font: bold 15pt "Arial";
    }
    
    QDockWidget::title{ 
    background-color: rgb(0,255,100);
    border: 1px solid red;
    text-align: center;
    
    }
    ]]
)
This example looks ugly but it shows how to change the UserWindow border style :)

Re: Userwindows Border Colors

Posted: Wed Aug 26, 2020 8:00 am
by Jaren
Very cool, thanks.

Re: Userwindows Border Colors

Posted: Wed Aug 26, 2020 8:20 am
by Jaren
Wow, now that was a fun little rabbit hole. I found a whole set of options here too. https://doc.qt.io/qt-5/stylesheet-reference.html
The only thing I am unable to change so far is the little white resize bar between the docked userwindow and the main window.

I tried this but it seems to be something else.

Code: Select all

QMainWindow::separator {
    background: yellow;
    width: 10px;
    height: 10px;
}

Re: Userwindows Border Colors

Posted: Wed Aug 26, 2020 8:34 am
by Alyven
Jaren wrote:
Wed Aug 26, 2020 8:20 am

Code: Select all

QMainWindow::separator {
    background: yellow;
    width: 10px;
    height: 10px;
}
To get this to work you'll have to use setAppStyleSheet (it's not part of the ProfileStyleSheet)

Btw I made a new PR to change stylesheet for every single userwindow (border and title area)
You can test it by using the Test version here: https://github.com/Mudlet/Mudlet/pull/4 ... -680725000

If it works for you please leave a feedback at github there :)

Re: Userwindows Border Colors

Posted: Thu Aug 27, 2020 6:13 am
by Jaren
Been working with this and found a nice ready made package called QDarkStyleSheet. I have modified the colors in this to work with my current plugins and I ran into a situation where changing the color of the widget has forced a color change on all mudlet gauges as well. I wanted to go with black but it seems there is no way to break out the gauges as an exception from the setAppStyleSheet setting. Strangely enough it affects the gauges.back and gauges.front colors but not gauges.text.

Here is a screenshot of my plugins with the below code in place.

Code: Select all

QWidget
{
    color: #eff0f1;
    background-color: #000000;
    selection-background-color:#3daee9;
    selection-color: #eff0f1;
    background-clip: border;
    border-image: none;
    border: 0px transparent black;
    outline: 0;
}
Image

Everything looks great if not for the fact that the above code also changes the gauges to black. Can anyone think of an easy fix to this? Perhaps some way to make gauges that are not affected by the styling or a way to exclude the gauges or a way to overwrite the above settings to exclude just gauges?

Re: Userwindows Border Colors

Posted: Thu Aug 27, 2020 6:32 am
by Alyven
Jaren wrote:
Thu Aug 27, 2020 6:13 am

Code: Select all

QWidget
{
    color: #eff0f1;
    background-color: #000000;
    selection-background-color:#3daee9;
    selection-color: #eff0f1;
    background-clip: border;
    border-image: none;
    border: 0px transparent black;
    outline: 0;
}
Try to avoid using QWidget by itself as styling option as it is to general and styles to many things at once.
As for a DarkTheme package I suggest viewtopic.php?f=6&t=22728
Jaren wrote:
Thu Aug 27, 2020 6:13 am
Strangely enough it affects the gauges.back and gauges.front colors but not gauges.text.
This is a known issue and a workaround is to set the appstylesheet before the creation/styling of the gauges by putting the styling script on top in the script view. Another workaround would be to restyle the gauges/labels after settings the AppStyleSheet.

Re: Userwindows Border Colors

Posted: Thu Aug 27, 2020 6:33 am
by Jaren
Thanks for the quick response. I'll give those a try.