1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-27 06:03:51 +03:00

use only exter.margins for separators

--separators are only usings the external margins
between items. In the past it was also consider
the indicators internal padding. This is not
needed and it was creating too big empty
spaces with no real reason.
This commit is contained in:
Michail Vourlakos 2019-08-30 02:44:33 +03:00
parent 768a6b4b2a
commit edfd111d9a
3 changed files with 6 additions and 5 deletions

View File

@ -32,7 +32,8 @@ Item{
property bool neighbourSeparator: false;
property int separatorSpace: neighbourSeparator && !appletItem.isSeparator && !appletItem.latteApplet && root.zoomFactor>1 ? (2+root.lengthMargin) : 0
property int separatorSpace: neighbourSeparator && !appletItem.isSeparator && root.parabolicEffectEnabled
&& !appletItem.latteApplet ? (2.5+root.lengthExtMargin) : 0
property real nHiddenSize: {
if (isSeparator || !communicator.lengthMarginsEnabled) {

View File

@ -45,9 +45,9 @@ Item{
//and it is used later on Behaviors in order to not break
//the activity change animations from removal/additions of tasks
//! && !root.inActivityChange (deprecated) in order to check if it is fixed
property int separatorSpace: neighbourSeparator && !isSeparator
property int separatorSpace: neighbourSeparator && !isSeparator && root.parabolicEffectEnabled
&& !(parabolicManager.hasInternalSeparator && root.dragSource) ?
(2+root.lengthMargin) : 0
(2.5+root.lengthExtMargin) : 0
property bool rightSpacer: false

View File

@ -50,7 +50,7 @@ MouseArea{
return 0;
if (isSeparator)
return root.vertical ? root.iconSize + root.thickMargins : (root.dragSource || !root.parabolicEffectEnabled ? 5+root.lengthMargins : 0);
return root.vertical ? root.iconSize + root.thickMargins : (root.dragSource || !root.parabolicEffectEnabled ? 5+2*root.lengthExtMargin : 0);
if (root.vertical) {
return wrapper.width;
@ -68,7 +68,7 @@ MouseArea{
return 0;
if (isSeparator)
return !root.vertical ? root.iconSize + root.thickMargins : (root.dragSource || !root.parabolicEffectEnabled ? 5+root.lengthMargins: 0);
return !root.vertical ? root.iconSize + root.thickMargins : (root.dragSource || !root.parabolicEffectEnabled ? 5+2*root.lengthExtMargin: 0);
if (root.vertical) {
return hiddenSpacerLeft.height + wrapper.height + hiddenSpacerRight.height;