Skip to content

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 and minimumHeight. Though it seems the KDE Human Interface Guidelines (HIG) recommend using Kirigami gridUnits . 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 and height (unless I just missed it, which is possible 😀). This could also be set in QML, and could also follow the HIG recommendation of using Kirigami gridUnits.
Edited by Eamonn Rea

Merge request reports