Skip to content

Commit

Permalink
Silence some binding errors msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
noee committed Mar 31, 2021
1 parent 0e66ed3 commit 701b791
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
4 changes: 2 additions & 2 deletions plasmoid/contents/ui/controls/SearchButton.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import QtQuick 2.8
import QtQuick.Controls 2.5
import QtQuick 2.12
import QtQuick.Controls 2.12

ToolButton {
icon.name: 'search'
Expand Down
4 changes: 2 additions & 2 deletions plasmoid/contents/ui/controls/ShuffleButton.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import QtQuick 2.8
import QtQuick.Controls 2.5
import QtQuick 2.12
import QtQuick.Controls 2.12

ToolButton {
icon.name: 'media-playlist-shuffle'
Expand Down
28 changes: 11 additions & 17 deletions plasmoid/contents/ui/controls/SortButton.qml
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
import QtQuick 2.8
import QtQuick 2.12
import QtQuick.Controls 2.12
import '../models'

Item {
ToolButton {
id: sorter
implicitWidth: button.width
implicitHeight: button.height
icon.name: "playlist-sort"

property bool showSort: true
// sort menu is derived from fields in the searcher model
// sort role stored in Searcher::sortField
property Searcher target

ToolButton {
id: button
icon.name: "playlist-sort"
onClicked: sortMenu.popup()
onClicked: sortMenu.popup()

text: showSort
? sorter.target ? sorter.target.sortField : ''
: ''
hoverEnabled: true
text: showSort
? sorter.target ? sorter.target.sortField : ''
: ''
hoverEnabled: true

ToolTip.text: 'Sort Tracks'
ToolTip.visible: hovered
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval

}
ToolTip.text: 'Sort Tracks'
ToolTip.visible: hovered
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval

Menu {
id: sortMenu
Expand Down

0 comments on commit 701b791

Please sign in to comment.