Skip to content

Commit

Permalink
v0.7.0 : Add the possibility to have a compact representation, and co…
Browse files Browse the repository at this point in the history
…ntext menu configure
  • Loading branch information
Cqoicebordel committed May 25, 2015
1 parent bef37aa commit 917f61e
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 3 deletions.
6 changes: 6 additions & 0 deletions cqcb.plasma.webslice/contents/config/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
</entry>
<entry name="enableTransparency" type="Bool">
<default>true</default>
</entry>
<entry name="displaySiteBehaviour" type="Bool">
<default>true</default>
</entry>
<entry name="buttonBehaviour" type="Bool">
<default>false</default>
</entry>
</group>
<group name="Advanced">
Expand Down
42 changes: 41 additions & 1 deletion cqcb.plasma.webslice/contents/ui/ConfigGeneral.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Item {
property alias cfg_enableReload: enableReload.checked
property alias cfg_reloadIntervalMin: reloadIntervalMin.value
property alias cfg_enableTransparency: enableTransparency.checked
property alias cfg_displaySiteBehaviour: displaySiteBehaviour.checked
property alias cfg_buttonBehaviour: buttonBehaviour.checked

property int textfieldWidth: theme.defaultFont.pointSize * 30

Expand Down Expand Up @@ -72,11 +74,49 @@ Item {
Text {
font.italic: true
text: i18n('Note that the transparency will only work if the page background is also transparent or not set.\nAlso, the transparency may not be visible until the page is reloaded or repainted.')
Layout.preferredWidth: 0
Layout.columnSpan: 3
//Layout.alignment: Qt.AlignLeft
}

Item {
width: 3
height: 25
}

Label {
text: i18n('Plasmoid behaviour :')
Layout.columnSpan: 3
}

GroupBox {
flat: true
Layout.columnSpan: 3

ColumnLayout {
ExclusiveGroup {
id: behaviourGroup
}

RadioButton {
id: displaySiteBehaviour
text: i18n("Display the site")
exclusiveGroup: behaviourGroup
}

RadioButton {
id: buttonBehaviour
text: i18n("Display a button that opens the site in a new panel")
exclusiveGroup: behaviourGroup
}
}
}

Text {
font.italic: true
text: i18n('Note that this behaviour will not be visible until the plasmoid is reloaded.')
Layout.columnSpan: 3
//Layout.alignment: Qt.AlignLeft
}
}

}
Expand Down
11 changes: 10 additions & 1 deletion cqcb.plasma.webslice/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Item {
property bool enableReload: plasmoid.configuration.enableReload
property int reloadIntervalMin: plasmoid.configuration.reloadIntervalMin
property bool enableTransparency: plasmoid.configuration.enableTransparency
property bool displaySiteBehaviour: plasmoid.configuration.displaySiteBehaviour
property bool buttonBehaviour: plasmoid.configuration.buttonBehaviour

property bool enableJSID: plasmoid.configuration.enableJSID
property string jsSelector: plasmoid.configuration.jsSelector
Expand All @@ -42,7 +44,9 @@ Item {
Layout.fillWidth: true
Layout.fillHeight: true

Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation

Plasmoid.preferredRepresentation: (displaySiteBehaviour)? Plasmoid.fullRepresentation : Plasmoid.compactRepresentation


WebView {
id: webview
Expand Down Expand Up @@ -79,6 +83,11 @@ Item {
text: i18n('Reload')
onTriggered: webview.reload()
}
MenuItem {
iconName: "configure"
text: i18n('Configure')
onTriggered: plasmoid.action("configure").trigger()
}
}

Timer {
Expand Down
2 changes: 1 addition & 1 deletion cqcb.plasma.webslice/metadata.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ X-KDE-PluginInfo-Author=Cqoicebordel
X-KDE-PluginInfo-Email[email protected]
X-KDE-PluginInfo-License=GPL3
X-KDE-PluginInfo-Name=cqcb.plasma.webslice
X-KDE-PluginInfo-Version=0.6.0
X-KDE-PluginInfo-Version=0.7.0
X-KDE-PluginInfo-Website=http://www.cqoicebordel.net/webslice-plasmoid/
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-API=declarativeappletscript
Expand Down

0 comments on commit 917f61e

Please sign in to comment.