Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Dock.qml
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,10 @@ Item {
// Without the split, a divider's slot gets half the margin an icon has
// inside its own slot on each side. Squeezed against its neighbours, the
// line made every difference in icon width show; with the full margin it
// stood too far apart. Half sits between the two.
readonly property real separatorWidth: root.placement.split
? Math.max(Style.space(1), root.sectionGap + 2 * root.baseRowLeft - 2 * root.gapWidth)
: root.labelPlates ? root.plateSpacing.separator : Style.space(1) + Math.round((root.iconSlot - root.baseIconArt) / 2)
// stood too far apart. Half sits between the two. Hidden takes the slot
// and its spacing out (-gapWidth): the sections meet one gap apart.
readonly property real separatorWidth: root.placement.split ? Math.max(Style.space(1), root.sectionGap + 2 * root.baseRowLeft - 2 * root.gapWidth)
: root.dividerStyle === "none" ? -root.gapWidth : root.labelPlates ? root.plateSpacing.separator : Style.space(1) + Math.round((root.iconSlot - root.baseIconArt) / 2)
readonly property int groupSlots: (root.appGroups && DockModel.isList(root.appGroups)) ? root.appGroups.length : 0
// Folders and buttons share the folder section, so they share its slot count.
readonly property int folderSlots: (root.pinnedFolders ? root.pinnedFolders.length : 0)
Expand Down
2 changes: 1 addition & 1 deletion SettingsSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var SETTINGS_SEARCH = [
{ key: "borderOpacityTheme", page: "appearance", label: "Border opacity from theme", terms: ["rim"] },
{ key: "borderOpacity", page: "appearance", label: "Border opacity", terms: ["rim"] },
{ key: "dividerLength", page: "appearance", label: "Divider length style", terms: ["divider", "lines", "classic"] },
{ key: "dividerStyle", page: "appearance", label: "Divider style", terms: ["divider", "lines"] },
{ key: "dividerStyle", page: "appearance", label: "Divider style", terms: ["divider", "lines", "hide", "hidden"] },
{ key: "dividerWidth", page: "appearance", label: "Divider width", terms: ["divider"] },
{ key: "dividerOpacity", page: "appearance", label: "Divider opacity", terms: ["divider"] },
{ key: "dividerHeight", page: "appearance", label: "Divider height", terms: ["divider", "length"] },
Expand Down
1 change: 1 addition & 0 deletions components/DockFitHost.qml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Item {
// Dock.separatorWidth at spacing fraction t (split sections widen with it).
function separatorWidthAt(t) {
if (root.placement.split) return Math.max(Style.space(1), Style.space(root.sectionSpacing) * t + 2 * root.baseRowLeft - 2 * host.gapAt(t))
if (root.dividerStyle === "none") return -host.gapAt(t)
return root.labelPlates ? root.plateSpacing.separator : Style.space(1) + Style.space(7)
}

Expand Down
1 change: 1 addition & 0 deletions components/PresetThumb.qml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ Item {
width: Style.space(5)
height: parent.height
Rectangle {
visible: thumb.dividerStyle !== "none"
anchors.centerIn: parent
width: thumb.dividerW
height: thumb.dividerH
Expand Down
6 changes: 4 additions & 2 deletions components/RowDivider.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import qs.Commons
// drives). With split sections the slot is the gap between two panels and
// draws no line. It narrows to nothing and fades its line when its section
// goes (DockMotion), and stays in the row while it has width, so a split
// panel narrows with it instead of vanishing in one frame.
// panel narrows with it instead of vanishing in one frame. A hidden divider
// (separatorWidth below zero) never has width: it leaves the row.
Item {
id: divider

Expand Down Expand Up @@ -51,7 +52,8 @@ Item {
// The line, placed by the card (70% of its height by default, as on
// macOS). It overflows the slot, so it does not grow the row.
Rectangle {
visible: !divider.lineHidden
// "Hidden" dividers keep the gap between sections and draw no line.
visible: !divider.lineHidden && !!divider.root && divider.root.dividerStyle !== "none"
anchors.horizontalCenter: parent.horizontalCenter
y: divider.root && divider.root.dividerGeometry === "long" && divider.cardRef
? divider.cardRef.dividerTop - divider.rowY - divider.y : (divider.root ? divider.root.iconCenterOffset : 0)
Expand Down
2 changes: 1 addition & 1 deletion components/logic/DockConfigLogic.qml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ QtObject {
root.sectionSpacing = parsed && typeof parsed.sectionSpacing === "number" ? Math.max(0, Math.min(48, Math.round(parsed.sectionSpacing))) : 18
root.dividerGeometry = parsed && parsed.dividerGeometry === "long" ? "long" : "classic"
root.dividerHeight = parsed && typeof parsed.dividerHeight === "number" && isFinite(parsed.dividerHeight) ? Math.max(20, Math.min(100, Math.round(parsed.dividerHeight))) : 70
root.dividerStyle = parsed && ["theme", "custom"].indexOf(parsed.dividerStyle) >= 0 ? parsed.dividerStyle : "simple"
root.dividerStyle = parsed && ["theme", "custom", "none"].indexOf(parsed.dividerStyle) >= 0 ? parsed.dividerStyle : "simple"
root.dividerWidth = parsed && typeof parsed.dividerWidth === "number" && isFinite(parsed.dividerWidth) ? Math.max(1, Math.min(6, Math.round(parsed.dividerWidth * 2) / 2)) : 1.5
root.dividerOpacity = parsed && typeof parsed.dividerOpacity === "number" && isFinite(parsed.dividerOpacity) ? Math.max(0, Math.min(1, parsed.dividerOpacity)) : 0.4
// Theme dividers without a border, saved before they turned custom.
Expand Down
10 changes: 5 additions & 5 deletions components/settings/SettingsAppearance.qml
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,19 @@ Column {
key: "dividerLength"
label: "Divider length style"
hint: "Classic preserves the original icon-height lines. Long uses an adjustable share of the dock height."
visible: root ? !root.placement.split : true
visible: root ? (!root.placement.split && root.dividerStyle !== "none") : true
options: [{ value: "classic", label: "Classic" }, { value: "long", label: "Long" }]
value: root ? root.dividerGeometry : "classic"
onPicked: function(v) { root.setOption("dividerGeometry", v) }
}
ChoiceRow {
key: "dividerStyle"
label: "Divider style"
hint: "Theme draws the lines like the border, in its colour, opacity and width. Custom sets the width and opacity by hand."
hint: "Theme draws the lines like the border, in its colour, opacity and width. Custom sets the width and opacity by hand. Hidden drops the lines and the room around them, for docks whose plates already show the sections."
visible: root ? !root.placement.split : true
options: (root && !root.showBorder)
? [{ value: "simple", label: "Simple" }, { value: "custom", label: "Custom" }]
: [{ value: "simple", label: "Simple" }, { value: "theme", label: "Theme" }, { value: "custom", label: "Custom" }]
? [{ value: "simple", label: "Simple" }, { value: "custom", label: "Custom" }, { value: "none", label: "Hidden" }]
: [{ value: "simple", label: "Simple" }, { value: "theme", label: "Theme" }, { value: "custom", label: "Custom" }, { value: "none", label: "Hidden" }]
value: root ? root.dividerStyle : "simple"
onPicked: function(v) { root.setDividerStyle(v) }
}
Expand Down Expand Up @@ -271,7 +271,7 @@ Column {
key: "dividerHeight"
label: "Divider height"
hint: "Length of the lines between sections, as a share of the dock's height."
visible: root ? (!root.placement.split && root.dividerGeometry === "long") : false
visible: root ? (!root.placement.split && root.dividerGeometry === "long" && root.dividerStyle !== "none") : false
minimum: 20
maximum: 100
step: 5
Expand Down
Loading