Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
Fix the location of footer. Show last update in the tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
librehat committed Aug 30, 2020
1 parent 1e4479e commit e935291
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions plasmoid/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQml.Models 2.12
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.extras 2.0 as PlasmaExtras
Expand Down Expand Up @@ -112,8 +113,9 @@ Item {
top: headerRow.bottom
left: parent.left
right: parent.right
bottom: parent.bottom
bottom: footer.top
topMargin: units.smallSpacing
bottomMargin: units.smallSpacing
}
}

Expand All @@ -138,30 +140,31 @@ Item {
stack.push(profileComponent, {symbol, stack});
}
}

footer: RowLayout {
PlasmaComponents3.Label {
Layout.fillWidth: true
font.pointSize: theme.smallestFont.pointSize
font.weight: Font.Thin
font.underline: true
opacity: 0.7
linkColor: theme.textColor
text: "<a href='https://finance.yahoo.com/'>Powered by Yahoo! Finance</a>"
onLinkActivated: Qt.openUrlExternally(link)
}
PlasmaComponents3.Label {
Layout.alignment: Qt.AlignRight
font.pointSize: theme.smallestFont.pointSize
font.weight: Font.Thin
visible: !!lastUpdated
text: "Last Updated: " + lastUpdated
}
}
}
}
}

PlasmaComponents3.Label {
id: footer
anchors.bottom: parent.bottom
anchors.right: parent.right

font.pointSize: theme.smallestFont.pointSize
font.weight: Font.Thin
font.underline: true
opacity: 0.7
linkColor: theme.textColor
text: "<a href='https://finance.yahoo.com/'>Powered by Yahoo! Finance</a>"
onLinkActivated: Qt.openUrlExternally(link)

PlasmaCore.ToolTipArea {
id: tooltip
anchors.fill: parent
mainText: "Last Updated"
subText: lastUpdated
}
}

Component {
id: profileComponent
ProfilePage {}
Expand Down

0 comments on commit e935291

Please sign in to comment.