[Look and feel] Add a way for LNF themes to manually specify Splash Screen, Latte Layout and Borderless Maximised Windows
Changes PlannedPublic

Authored by The-Feren-OS-Dev on Aug 12 2019, 9:45 PM.

Details

Reviewers
davidedmundson
mart
Group Reviewers
Plasma
Summary

BUG: 409015

This is a small change to the Look & Feel KCM Code to fix https://bugs.kde.org/show_bug.cgi?id=409015 by changing the Splash Screen changing code a little bit, as well as add the option for Look & Feels to specify a Latte Dock Layout and whether maximized windows have borders or not.

Splash Screen:
This revision makes Look & Feel check if the package has specified a Splash Screen, that it wants Plasma to change the user's current Splash Screen to, or not via the 'defaults' file and a check for the 'splashrc' 'Theme' value in there. If there isn't a value found it will revert back to the old method of applying Splash Screens - applying the Look & Feel name as the Splash Screen. If a value is found however, ksplashrc's Theme value will be set to that value instead of the Look & Feel's name.

The reason for having the fallback in this code to the old behaviour is that many popular Look & Feels, such as the Adapta Look & Feel, all rely on the fallback method of applying Splash Screens to have their Splash Screens be applied, and if the fallback isn't there nothing will then their currently applied Splash Screen simply won't change at all unless the Look & Feel package specifies a Splash Screen theme.

Latte Layout:
This patch adds the option for Look & Feel packages to set a Latte Dock theme. KWriteConfig is used in case Latte Dock isn't running to change two values since they need to both be changed for Latte to use the new layout. Otherwise, a DBus signal is also used to make Latte transition smoothly into the new layout selection without needing to reload Latte.

'None' disables Latte autostarting and closes Latte via a DBus signal if running as some Look & Feels might prefer to not have Latte running at all on them while others may. It's also because there's an easy way for Look & Feels to enable Latte, but no way otherwise to disable it afterwards.
This patch DOES NOT add support for directly importing new Latte layouts, however - that can come in another patch when I or someone else works on integrating that functionality into Look & Feel's code.

Borderless Maximized Windows:
This is just a piece of code that sets the kwinrc value 'BorderlessMaximizedWindows' to the value specified in the defaults file of a Look & Feel if one is specified.

Test Plan

Since no-one has themes on GHNS that'd benefit from this, mainly because either the themes stand on their own with their own splash screens independently, just use the default Breeze Splash Screen, or the L&F creators probably tried but noticed that their Splash Screens didn't apply properly on one of their L&F variants and gave up, I'll upload the main Feren OS Look & Feel variants here for testing purposes:

Sample Look & Feels for testing the Latte Layout changing and BorderlessMaximizedWindows functionality can be found here:

Diff Detail

Repository
R119 Plasma Desktop
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18075
Build 18093: arc lint + arc unit
Restricted Application added a project: Plasma. · View Herald TranscriptAug 12 2019, 9:45 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
The-Feren-OS-Dev requested review of this revision.Aug 12 2019, 9:45 PM
The-Feren-OS-Dev retitled this revision from kcmlookandfeel - Fixed Splash Screen applying to kcmlookandfeel - Correctly set the Splash Screen to what the Look & Feel intends for it to be set to.Aug 12 2019, 9:48 PM
The-Feren-OS-Dev edited the summary of this revision. (Show Details)Aug 12 2019, 9:50 PM
The-Feren-OS-Dev edited the summary of this revision. (Show Details)Aug 12 2019, 9:56 PM
GB_2 added a reviewer: Plasma.Aug 12 2019, 9:58 PM
ngraham retitled this revision from kcmlookandfeel - Correctly set the Splash Screen to what the Look & Feel intends for it to be set to to [Look and feel] Add a way for LNF themes to manually specify a splash screen.Sep 16 2019, 5:49 PM
The-Feren-OS-Dev edited the summary of this revision. (Show Details)Sep 16 2019, 5:55 PM
The-Feren-OS-Dev edited the test plan for this revision. (Show Details)
The-Feren-OS-Dev edited the summary of this revision. (Show Details)
The-Feren-OS-Dev edited the test plan for this revision. (Show Details)
fvogt added a subscriber: fvogt.Sep 19 2019, 4:32 PM
fvogt added inline comments.
kcms/lookandfeel/kcm.cpp
429

If the if block above is not entered, this is not done anymore. Intentional?

  • Based on a code review, re-added original behaviour for Splash Screen setting if there's no 'defaults' file

@fvogt Nope, but now you've mentioned that I've added an extra line if there's no defaults file found to set the Splash Screen to be the Look & Feel name like it originally would do.

tienisto removed a subscriber: tienisto.
The-Feren-OS-Dev marked an inline comment as done.

Added support for BorderlessMaximizedWindows and specifying a Latte Layout - Based on a code review, re-added original behaviour for Splash Screen setting if there's no 'defaults' file

The-Feren-OS-Dev retitled this revision from [Look and feel] Add a way for LNF themes to manually specify a splash screen to [Look and feel] Add a way for LNF themes to manually specify Splash Screen, Latte Layout and Borderless Maximised Windows.Oct 23 2019, 3:10 PM
The-Feren-OS-Dev edited the summary of this revision. (Show Details)
The-Feren-OS-Dev edited the test plan for this revision. (Show Details)
The-Feren-OS-Dev edited the summary of this revision. (Show Details)

Edited code based on feedback and added Latte Dock layout and BorderlessMaximisedWindow value changing functionality

The-Feren-OS-Dev edited the test plan for this revision. (Show Details)Oct 23 2019, 3:37 PM
The-Feren-OS-Dev planned changes to this revision.Jan 11 2020, 9:26 PM