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