Port towards KConfig XT
Needs ReviewPublic

Authored by davidre on Wed, Aug 21, 1:08 PM.

Details

Reviewers
None
Group Reviewers
Spectacle
Summary

Port settings to Kconfig XT. This enables us to drop our own settings class and
our own configuration dialog logic with it's logic. Setting the objectNames of
the Widgets accordingly enables us to reuse them.
The settings not managed through the Dialog (last save locations and screenshot
options in the main window) are written now on exit but are still instant apply.
Using this opportunity this also unifies the naming style and moves some
settings inside the config file around: In general they are now in the same group
as they are in the settings dialog. Additionally [Save] includes
lastSave(As)Location, too. In [GuiConfig] are the options which are set in the
main window and the last crop region.
Also includes a behavioral change: "Open Screenshots Folder" will now open the
default folder as configured. The folder with the the last saved screenshot can
be opened from the inline message when saving.

BUG: 389894
FIXED-IN: 19.12.0

Test Plan

Works as before but the dialog has now more buttons

Diff Detail

Repository
R166 Spectacle
Branch
config
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15733
Build 15751: arc lint + arc unit
davidre created this revision.Wed, Aug 21, 1:08 PM
Restricted Application added a project: Spectacle. · View Herald TranscriptWed, Aug 21, 1:08 PM
davidre requested review of this revision.Wed, Aug 21, 1:08 PM
davidre updated this revision to Diff 64675.Mon, Aug 26, 4:15 PM

Rebase add autocopy and autosave

davidre retitled this revision from [WIP] Port towards KConfig XT to Port towards KConfig XT.Mon, Aug 26, 4:16 PM
davidre edited the summary of this revision. (Show Details)
ngraham edited the summary of this revision. (Show Details)Mon, Aug 26, 8:52 PM
  • The settings window has some graphical glitches:
  • All my settings were restored to their default values
  • The Press Screenshot To radio button did not have a pre-selected value
  • PNG images are huge again
  • The settings window has some graphical glitches:

Whoops that was just for debugging

  • All my settings were restored to their default value
  • The Press Screenshot To radio button did not have a pre-selected value
  • PNG images are huge again

Did you do the update? I think I need to still add the installation of it to the CmakeLists.txt

Ah yeah, probably best to add that last, yeah.

davidre updated this revision to Diff 64738.Tue, Aug 27, 1:28 PM
  • Install update file and make workaround work

The dialog still needs to be resized so every page fits if there is no way to do it automatically. Looking at Okular maybe not since it also has some scrollable pages?

I don't believe there's an automatic way. Generally people just set a minimum size on the parent dialog that's high enough to accommodate the tallest and widest page.

davidre updated this revision to Diff 64812.Wed, Aug 28, 10:02 AM
  • Set a size for the dialog