mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-08 13:18:09 +03:00
fix primaryconfig maximum height
--the new approach uses canvas geometry and computes properly the maximum available screen height in order for Primary Dock Settings window to use screen height effectively
This commit is contained in:
parent
996b1aaf9b
commit
b31792cd7b
@ -55,6 +55,9 @@ class Positioner: public QObject
|
||||
Q_PROPERTY(bool isStickedOnBottomEdge READ isStickedOnBottomEdge WRITE setIsStickedOnBottomEdge NOTIFY isStickedOnBottomEdgeChanged)
|
||||
|
||||
Q_PROPERTY(int currentScreenId READ currentScreenId NOTIFY currentScreenChanged)
|
||||
|
||||
Q_PROPERTY(QRect canvasGeometry READ canvasGeometry NOTIFY canvasGeometryChanged)
|
||||
|
||||
//! animating window slide
|
||||
Q_PROPERTY(int slideOffset READ slideOffset WRITE setSlideOffset NOTIFY slideOffsetChanged)
|
||||
Q_PROPERTY(QString currentScreenName READ currentScreenName NOTIFY currentScreenChanged)
|
||||
|
@ -59,11 +59,17 @@ Loader {
|
||||
//! we use 100px. or 50px. in order to give space for othe views to be shown and to have also
|
||||
//! some space around the settings window
|
||||
property int maxHeight: plasmoid.formFactor === PlasmaCore.Types.Horizontal ?
|
||||
viewConfig.availableScreenGeometry.height - (latteView.editThickness - latteView.maxNormalThickness) - units.largeSpacing :
|
||||
viewConfig.availableScreenGeometry.height - canvasHeadThickness - units.largeSpacing :
|
||||
viewConfig.availableScreenGeometry.height - 2 * units.largeSpacing
|
||||
|
||||
property int maxWidth: 0.6 * latteView.screenGeometry.width
|
||||
|
||||
property int canvasThickness: plasmoid.formFactor === PlasmaCore.Types.Vertical ? latteView.positioner.canvasGeometry.width : latteView.positioner.canvasGeometry.height
|
||||
property int canvasHeadThickness: {
|
||||
var edgeMargin = latteView.behaveAsPlasmaPanel && latteView.screenEdgeMarginEnabled ? latteView.screenEdgeMargin : 0;
|
||||
return Math.max(0,canvasThickness - latteView.maxNormalThickness - Math.max(0,edgeMargin))
|
||||
}
|
||||
|
||||
//! propose size based on font size
|
||||
property int proposedWidth: 0.82 * proposedHeight + units.smallSpacing * 2
|
||||
property int proposedHeight: 36 * theme.mSize(theme.defaultFont).height
|
||||
|
Loading…
Reference in New Issue
Block a user