Commit 7e8b9d4d authored by Nate Graham's avatar Nate Graham 🔩

[folder view] de-duplicate switch width/height logic

parent 59985c6e
......@@ -51,7 +51,7 @@ FolderViewDropArea {
Layout.maximumWidth: isPopup ? preferredWidth(false) : -1
Layout.maximumHeight: isPopup ? preferredHeight(false) : -1
Plasmoid.switchWidth: {
function switchSize() {
// Support expanding into the full representation only on vertical panels.
if (isPopup && plasmoid.formFactor === PlasmaCore.Types.Vertical) {
return PlasmaCore.Units.iconSizeHints.panel;
......@@ -60,14 +60,8 @@ FolderViewDropArea {
return 0;
}
Plasmoid.switchHeight: {
// Support expanding into the full representation only on vertical panels.
if (isPopup && plasmoid.formFactor === PlasmaCore.Types.Vertical) {
return PlasmaCore.Units.iconSizeHints.panel;
}
return 0;
}
Plasmoid.switchWidth: { switchSize(); }
Plasmoid.switchHeight: { switchSize(); }
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment