Skip to content
  • Marco Martin's avatar
    introduce the Defaults group for panel values · 9fa4d941
    Marco Martin authored
    Summary:
    when plasma is starting up, there are no panel views yet
    this means that if a thickness (or other values)
    are written to the config file and then the resolution changes before
    the panel view gets created, we'll have a view that will default
    to 30 pixels regardless what the layout js file specified.
    
    This makes the scripting only write to a [Default] group for resolution
    dependent properties when panels are not actually present
    when they are already there, interact directly with the view which is
    the safest option.
    
    the view will use whatever is in the defaults group as default if the
    resolution dependent is there, and when a new value is set for a
    resolution dependent one, also update the default, which will
    be used when screen resolution changes, as new default value
    
    Test Plan:
    * With virtualbox, change resolution continuously when plasma is starting up
    with an empty setup, panel is the expected size now, as opposed to 30
    * Stop Plasma. Change Screen resoluton with plasma *not* running, to a resoluton
    still "unknown" to plasmashellrc, then start plasma again. Now the thickness saved
    in [Default] is picked, instead of the arbitrary 30
    
    Reviewers: #plasma, broulik
    
    Reviewed By: #plasma, broulik
    
    Subscribers: apol, plasma-devel
    
    Tags: #plasma
    
    Differential Revision: https://phabricator.kde.org/D22893
    9fa4d941