Commit 3d388480 authored by Nate Graham's avatar Nate Graham 💤
Browse files

Revert "Refine style of add widget sidebar"

This reverts commit f17eae91.

It was committed without adequate discussion and there were unresolved
discussions. Furthermore, no code review was done, and as a result it
shipped with visual regressions.

We will re-discuss and commit a fixed version if appropriate.
parent f17eae91
......@@ -119,7 +119,7 @@ Item {
width: runningBadge.width + Math.round(units.smallSpacing * 1.5)
height: width
radius: height
visible: running && list.currentIndex == index
visible: running
}
}
......@@ -129,7 +129,7 @@ Item {
height: Math.round(theme.mSize(countLabel.font).height * 1.3)
radius: height
color: theme.highlightColor
visible: running && list.currentIndex == index
visible: running
onVisibleChanged: maskShaderSource.scheduleUpdate()
PlasmaComponents.Label {
......@@ -179,7 +179,7 @@ Item {
tooltip: delegate.pendingUninstall ? i18nd("plasma_shell_org.kde.plasma.desktop", "Undo uninstall")
: i18nd("plasma_shell_org.kde.plasma.desktop", "Uninstall widget")
flat: false
visible: model.local && list.currentIndex == index
visible: model.local
onHoveredChanged: {
if (hovered) {
// hovering the uninstall button triggers onExited of the main mousearea
......
......@@ -25,7 +25,6 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.kquickcontrolsaddons 2.0
import org.kde.kwindowsystem 1.0
import org.kde.kirigami 2.10 as Kirigami
import QtQuick.Window 2.1
import QtQuick.Layouts 1.1
......@@ -197,74 +196,68 @@ Item {
*/
PlasmaExtras.PlasmoidHeading {
id: topArea
implicitWidth: header.implicitWidth
implicitHeight: header.implicitHeight
RowLayout {
id: topBar
anchors {
top: parent.top
left: parent.left
right: parent.right
}
ColumnLayout {
id: header
anchors.fill: parent
RowLayout {
Kirigami.Heading {
id: heading
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Widgets")
elide: Text.ElideRight
}
Item { Layout.fillWidth: true }
PlasmaComponents.ToolButton {
id: categoryButton
tooltip: i18nd("plasma_shell_org.kde.plasma.desktop", "Categories")
iconSource: "view-filter"
onClicked: {
categoriesDialog.model = widgetExplorer.filterModel
categoriesDialog.open(0, categoryButton.height)
}
}
PlasmaComponents.ToolButton {
id: closeButton
iconSource: "window-close"
onClicked: main.closed()
}
}
RowLayout {
PlasmaComponents.TextField {
id: searchInput
Layout.fillWidth: true
clearButtonShown: true
placeholderText: i18nd("plasma_shell_org.kde.plasma.desktop", "Search...")
onTextChanged: {
list.positionViewAtBeginning()
list.currentIndex = -1
widgetExplorer.widgetsModel.searchTerm = text
}
Component.onCompleted: forceActiveFocus()
}
PlasmaComponents.ToolButton {
id: getWidgetsButton
iconSource: "get-hot-new-stuff"
tooltip: i18nd("plasma_shell_org.kde.plasma.desktop", "Get New Widgets...")
onClicked: {
getWidgetsDialog.model = widgetExplorer.widgetsMenuActions
getWidgetsDialog.openRelative()
}
}
Item {
id: header
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
PlasmaExtras.Heading {
id: heading
anchors.verticalCenter: parent.verticalCenter
level: 1
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Widgets")
width: parent.width
elide: Text.ElideRight
}
}
Item {
height: units.smallSpacing
PlasmaComponents.ToolButton {
id: categoryButton
tooltip: i18nd("plasma_shell_org.kde.plasma.desktop", "Categories")
iconSource: "view-filter"
onClicked: {
categoriesDialog.model = widgetExplorer.filterModel
categoriesDialog.open(0, categoryButton.height)
}
}
PlasmaComponents.ToolButton {
id: closeButton
iconSource: "window-close"
onClicked: main.closed()
}
}
RowLayout {
id: newSearchRow
anchors.top: topBar.bottom
anchors.topMargin: units.smallSpacing
width: topBar.width
PlasmaComponents.TextField {
id: searchInput
Layout.fillWidth: true
clearButtonShown: true
placeholderText: i18nd("plasma_shell_org.kde.plasma.desktop", "Search...")
onTextChanged: {
list.positionViewAtBeginning()
list.currentIndex = -1
widgetExplorer.widgetsModel.searchTerm = text
}
Component.onCompleted: forceActiveFocus()
}
}
Timer {
id: setModelTimer
interval: 20
......@@ -274,10 +267,12 @@ Item {
PlasmaExtras.ScrollArea {
anchors {
top: topArea.bottom
top: newSearchRow.bottom
left: parent.left
right: parent.right
bottom: parent.bottom
bottom: bottomBar.top
bottomMargin: units.smallSpacing
topMargin: units.smallSpacing
}
verticalScrollBarPolicy: Qt.ScrollBarAlwaysOn
......@@ -350,4 +345,29 @@ Item {
}
}
}
Column {
id: bottomBar
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
spacing: units.smallSpacing
PlasmaComponents.Button {
id: getWidgetsButton
anchors {
left: parent.left
right: parent.right
}
iconSource: "get-hot-new-stuff"
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Get New Widgets...")
onClicked: {
getWidgetsDialog.model = widgetExplorer.widgetsMenuActions
getWidgetsDialog.openRelative()
}
}
}
}
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