Main: Store window geomety with KConfig.WindowStateSaver
Currently, AudioTube doesn't remember window geometry or state at all. This MR implements this using KConfig.WindowStateSaver
, which is beginning adoption across KDE applications. This will store window sizing when the application is closed, and with a recent commit to KConfig, will also remember the window maximized state.
A couple of notes:
- I am unsure how this will impact Qt5, I had to enable AudioTube to build with Qt6 as it seemed to want to use Qt5 by default, so I wanted to mention this in case there could be some problems implementing this change with Qt5.
- Currently, AudioTube is using fixed values for
minimumWidth
andminimumHeight
. Though it seems the KDE Human Interface Guidelines (HIG) recommend using KirigamigridUnits
. I am not sure what the multiplication should be, but if this is desired, I can implement the desired sizing in this MR or in a follow-up. - Also, it does not appear to set a default
width
andheight
(unless I just missed it, which is possible😀 ). This could also be set in QML, and could also follow the HIG recommendation of using KirigamigridUnit
s.
Edited by Eamonn Rea