Userwindows Border Colors
Userwindows Border Colors
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
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
Ah ok, thanks for the info.
Re: Userwindows Border Colors
It is possible to change the border settings for QDockWidgets (which includes UserWindows) by using ProfileStyleSheet.
try this (ugly) example.
This example looks ugly but it shows how to change the UserWindow border style
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;
}
]]
)
Re: Userwindows Border Colors
Very cool, thanks.
Re: Userwindows Border Colors
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.
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
To get this to work you'll have to use setAppStyleSheet (it's not part of the ProfileStyleSheet)Jaren wrote: ↑Wed Aug 26, 2020 8:20 amCode: Select all
QMainWindow::separator { background: yellow; width: 10px; height: 10px; }
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
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.
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?
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;
}
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
Try to avoid using QWidget by itself as styling option as it is to general and styles to many things at once.Jaren wrote: ↑Thu Aug 27, 2020 6:13 amCode: 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; }
As for a DarkTheme package I suggest viewtopic.php?f=6&t=22728
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
Thanks for the quick response. I'll give those a try.