Redo the popup window to use styleable components
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
e757056047
commit
314b3d56f2
@ -11,7 +11,7 @@ Falkon.PluginInterface {
|
|||||||
property string jsFinder
|
property string jsFinder
|
||||||
}
|
}
|
||||||
|
|
||||||
init: function(state, settingsPath){
|
init: function(state, settingsPath) {
|
||||||
console.log(i18n('"RSSFinder" plugin is loading'))
|
console.log(i18n('"RSSFinder" plugin is loading'))
|
||||||
rssFinderObject.jsFinder = Falkon.FileUtils.readAllFileContents('finder.js')
|
rssFinderObject.jsFinder = Falkon.FileUtils.readAllFileContents('finder.js')
|
||||||
if (rssFinderObject.jsFinder.length == 0) {
|
if (rssFinderObject.jsFinder.length == 0) {
|
||||||
@ -64,47 +64,61 @@ Falkon.PluginInterface {
|
|||||||
location: Falkon.BrowserAction.NavigationToolBar | Falkon.BrowserAction.StatusBar
|
location: Falkon.BrowserAction.NavigationToolBar | Falkon.BrowserAction.StatusBar
|
||||||
onClicked: findFeeds()
|
onClicked: findFeeds()
|
||||||
|
|
||||||
popup: ScrollView {
|
popup: Pane {
|
||||||
id: popupWindow
|
id: mainPane
|
||||||
width: 500
|
width: 500
|
||||||
height: 200
|
height: 200
|
||||||
|
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOn
|
ScrollView {
|
||||||
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
width: mainPane.width
|
||||||
|
height: mainPane.height
|
||||||
|
|
||||||
ListView {
|
anchors.top: parent.top
|
||||||
Component {
|
anchors.right: parent.right
|
||||||
id: contactsDelegate
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Button {
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
hoverEnabled: true
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
||||||
width: popupWindow.width
|
|
||||||
onClicked: Falkon.Clipboard.copy(url)
|
|
||||||
|
|
||||||
ToolTip.delay: 1000
|
ListView {
|
||||||
ToolTip.timeout: 5000
|
Component {
|
||||||
ToolTip.visible: hovered
|
id: contactsDelegate
|
||||||
ToolTip.text: i18n("Click to copy URL")
|
|
||||||
|
|
||||||
ColumnLayout {
|
Button {
|
||||||
id: wrapper
|
hoverEnabled: true
|
||||||
spacing: 0
|
onClicked: Falkon.Clipboard.copy(url)
|
||||||
|
width: rssList.width
|
||||||
|
height: wrapper.height
|
||||||
|
|
||||||
Text {
|
ToolTip.delay: 1000
|
||||||
font.bold: true
|
ToolTip.timeout: 5000
|
||||||
text: title
|
ToolTip.visible: hovered
|
||||||
}
|
ToolTip.text: i18n("Click to copy URL")
|
||||||
Text {
|
|
||||||
text: url
|
ColumnLayout {
|
||||||
|
id: wrapper
|
||||||
|
spacing: 2
|
||||||
|
|
||||||
|
Label {
|
||||||
|
font.bold: true
|
||||||
|
text: title
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
text: url
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
model: rssFinderObject.feeds
|
id: rssList
|
||||||
delegate: contactsDelegate
|
model: rssFinderObject.feeds
|
||||||
focus: true
|
delegate: contactsDelegate
|
||||||
|
focus: true
|
||||||
|
spacing: 5
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user