Userwindows questions

Post Reply
Nyyrazzilyss
Posts: 317
Joined: Thu Mar 05, 2015 2:53 am

Userwindows questions

Post by Nyyrazzilyss » Mon Aug 28, 2017 2:56 am

I've just started taking a look at user windows, with the intent of making one of the windows in my package draggable.

A couple questions:

moveWindow and resizeWindow would appear to effect the size of the window inside the floating container. Is there a similar command to
move/resize the entire container?

Related to the above, after manually resizing/moving a userwindow, the new information is saved. Is this information included when a package is exported, or does the starting information need to be re-created?

Is it possible to apply a stylesheet to the userWindow?

Thanks

User avatar
TheFae
Posts: 10
Joined: Thu Jun 08, 2017 6:48 pm

Re: Userwindows questions

Post by TheFae » Tue Aug 29, 2017 6:08 pm

So far, there are not many commands which control position or size of the UserWindow objects.
I'm not sure if there is a method available in Mudlet for applying style sheets directly to the `QDockWidget` object that makes up the base of the UserWindow, but the QDockWidget should accept a "styleSheet" that uses Qt's CSS directives.

Adding a support for stylesheets might not be too hard.
Adding support for moving/resizing the UserWindows via Lua might be a little more complicated since the QDockWidgets can be placed in either a fixed (docked) or floating position which need to be accounted for.
I don't know when I'll be able to add these in myself, but I'm sure they are doable.

User avatar
Vadi
Posts: 4409
Joined: Sat Mar 14, 2009 3:13 pm

Re: Userwindows questions

Post by Vadi » Tue Aug 29, 2017 6:20 pm

One thing you could look into doing right now with Mudlet is use a miniconsole - that'll stay within the Mudlet screen, but it's possible to make it draggable. 3.1 added mouse tracking and there's events for mouse press and release!

User avatar
TheFae
Posts: 10
Joined: Thu Jun 08, 2017 6:48 pm

Re: Userwindows questions

Post by TheFae » Sun Sep 03, 2017 6:18 pm

I've noticed while looking into this, the Mudlet Lua function setAppStyleSheet() can also be used to globally style the QDockWidget objects, which should allow for some degree of customizing the UserWindows and floating toolbars.

The QSS (Qt CSS) markup can be found on this page, just search for "QDockWidget" and you'll find some QSS examples here:
http://doc.qt.io/qt-5.6/stylesheet-examples.html

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests