Closed vadi2 closed 7 years ago
@itsTheFae not sure if you're across this, just realised it's never been filed but it is a major issue for use of userwindows...
Where do the styles get set? Some light reading shows me something about a style sheet and using either the class name or the objectName property to selectively set the styles.
When I made the TDockWidget, if there was previously styles applied to QDockWidget we should only need to copy those styles for the TDockWidget variation.
And do these things ever need to be set or configurable?
See
int mBorderBottomHeight;
int mBorderLeftWidth;
int mBorderRightWidth;
int mBorderTopHeight;
These settings are already configurable through the Lua API and Mudlets settings!
This had me confused for a second but I think I've found the issue.
Line 968 of mudlet.cpp uses the wrong constructor for the TConsole
object, the line should be changed from:
auto pC = new TConsole( pHost, false );
To:
auto pC = new TConsole( pHost, false, pD );
That should cause the TConsole
to register as a sub-console and avoid it using the border settings from the main console.
That extra argument is used to supply a QWidget *
parent - it uses the same constructor but it has a default 0
{i.e. a nullptr
} value used if not supplied. That being the case it does affect the execution path in the constructor so I can believe this...
Every userwindow that's created inherits the main window's border settings, which is a real problem if you're using a UI that sets them (example) - there's a lot of wasted space on the userwindow then.