D12148: update the wallpaper dialog to the new design
David Edmundson
noreply at phabricator.kde.org
Mon Apr 16 14:31:11 UTC 2018
davidedmundson requested changes to this revision.
davidedmundson added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> config.qml:286-287
> + id: wallpapersGrid
> anchors.fill: parent
> -
> - frameVisible: true
> - highlightOnFocus: true;
> -
> - Component.onCompleted: {
> - //replace the current binding on the scrollbar that makes it visible when content doesn't fit
> -
> - //otherwise we adjust gridSize when we hide the vertical scrollbar and
> - //due to layouting that can make everything adjust which changes the contentWidth/height which
> - //changes our scrollbars and we continue being stuck in a loop
> -
> - //looks better to not have everything resize anyway.
> - //BUG: 336301
> - __verticalScrollBar.visible = true
> - }
> -
> - GridView {
> - id: wallpapersGrid
> - model: imageWallpaper.wallpaperModel
> - currentIndex: -1
> - focus: true
> -
> - cellWidth: Math.floor(wallpapersGrid.width / Math.max(Math.floor(wallpapersGrid.width / (units.gridUnit*12)), 3))
> - cellHeight: Math.round(cellWidth / (imageWallpaper.targetSize.width / imageWallpaper.targetSize.height))
> -
> - anchors.margins: 4
> - boundsBehavior: Flickable.StopAtBounds
> -
> - delegate: WallpaperDelegate {
> - color: cfg_Color
> - }
> -
> - onContentHeightChanged: {
> - wallpapersGrid.currentIndex = imageWallpaper.wallpaperModel.indexOf(cfg_Image);
> - wallpapersGrid.positionViewAtIndex(wallpapersGrid.currentIndex, GridView.Visible)
> - }
> -
> - Keys.onPressed: {
> - if (count < 1) {
> - return;
> - }
> -
> - if (event.key == Qt.Key_Home) {
> - currentIndex = 0;
> - } else if (event.key == Qt.Key_End) {
> - currentIndex = count - 1;
> - }
> - }
> -
> - Keys.onLeftPressed: moveCurrentIndexLeft()
> - Keys.onRightPressed: moveCurrentIndexRight()
> - Keys.onUpPressed: moveCurrentIndexUp()
> - Keys.onDownPressed: moveCurrentIndexDown()
> -
> - Connections {
> - target: imageWallpaper
> - onCustomWallpaperPicked: {
> - wallpapersGrid.currentIndex = 0;
> - cfg_Image = path;
> - }
> - }
> -
> + width: Math.min(implicitWidth, parent.width)
> +
You can't have both.
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D12148
To: mart, #plasma, #vdg, davidedmundson
Cc: davidedmundson, broulik, abetts, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180416/eff0e685/attachment.html>
More information about the Plasma-devel
mailing list