Commit ed903cfa authored by Camilo higuita's avatar Camilo higuita

ui tweaks on the viewer page

parent 8b95bfbc
......@@ -18,7 +18,6 @@
<file>widgets/views/Pix.js</file>
<file>widgets/dialogs/Tags/TagsDialog.qml</file>
<file>widgets/dialogs/Tags/TagsList.qml</file>
<file>view_models/PixDelegate.qml</file>
<file>widgets/views/Albums/AlbumsGrid.qml</file>
<file>widgets/views/Albums/AlbumDelegate.qml</file>
<file>widgets/dialogs/Albums/AlbumsDialog.qml</file>
......
import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import org.kde.kirigami 2.2 as Kirigami
ItemDelegate
{
width: parent.width
height: rowHeight
property bool isSection : false
property bool boldLabel : false
property alias label: labelTxt.text
property string labelColor: ListView.isCurrentItem ? highlightedTextColor : textColor
Rectangle
{
anchors.fill: parent
color: isSection ? viewBackgroundColor : (index % 2 === 0 ? Qt.darker(backgroundColor) : "transparent")
opacity: 0.1
}
ColumnLayout
{
anchors.fill: parent
Label
{
id: labelTxt
Layout.margins: contentMargins
anchors.verticalCenter: parent.verticalCenter
width: parent.width
height: parent.height
horizontalAlignment: Qt.AlignLeft
verticalAlignment: Qt.AlignVCenter
text: labelTxt.text
elide: Text.ElideRight
color: labelColor
font.pointSize: fontSizes.default
font.bold: boldLabel
font.weight : boldLabel ? Font.Bold : Font.Normal
}
}
}
......@@ -156,7 +156,7 @@ ItemDelegate
visible: parent.visible && showSelectionBackground
anchors.fill: parent
z: -1
radius: 3
radius: radiusV
color: hightlightedColor
opacity: hovered ? 0.25 : 1
}
......
......@@ -11,7 +11,7 @@ Maui.Dialog
property var picUrls : []
signal picTagged(string tag)
maxHeight: unit * 500
maxHeight: unit * 500
onOpened: populate()
onAccepted: addToAlbum(albumsList.model.get(albumsList.currentIndex).album)
......@@ -20,7 +20,6 @@ Maui.Dialog
{
anchors.fill: parent
AlbumsList
{
id: albumsList
......@@ -32,7 +31,7 @@ Maui.Dialog
{
id: albumText
Layout.fillWidth: true
placeholderText: "New album..."
placeholderText: qsTr("New album...")
onAccepted:
{
albumsList.model.insert(0, {album: albumText.text})
......
......@@ -9,13 +9,6 @@ ListView
signal albumClicked(int index)
highlight: Rectangle
{
width: albumsListRoot.width
height: albumsListRoot.currentItem.height
color: highlightColor
}
focus: true
interactive: true
highlightFollowsCurrentItem: true
......@@ -26,17 +19,18 @@ ListView
id: holder
emoji: "qrc:/img/assets/RedPlanet.png"
isMask: false
title : "No albums!"
body: "Start creating new albums"
title : qsTr("No albums!")
body: qsTr("Start creating new albums")
emojiSize: iconSizes.huge
visible: count === 0
}
model: ListModel{}
delegate: PixDelegate
delegate: Maui.ListDelegate
{
id: delegate
label: album
radius: radiusV
Connections
{
......
......@@ -23,7 +23,6 @@ Maui.Dialog
ColumnLayout
{
anchors.fill: parent
Item
{
Layout.fillHeight: true
......@@ -39,7 +38,6 @@ Maui.Dialog
tagListComposer.model.insert(0, {tag: tagsList.model.get(index).tag})
}
}
}
......
......@@ -10,12 +10,6 @@ ListView
signal tagClicked(int index)
highlight: Rectangle
{
width: tagListRoot.width
color: highlightColor
}
focus: true
interactive: true
highlightFollowsCurrentItem: true
......@@ -37,7 +31,7 @@ ListView
{
id: delegate
label: tag
radius: radiusV
Connections
{
target: delegate
......
......@@ -30,14 +30,39 @@ Maui.Page
headBarExit: false
headBarTitle: currentPic.title ? currentPic.title : ""
headBar.rightContent: [
Maui.ToolButton
{
iconName: "document-save-as"
onClicked: albumsDialog.open()
},
Maui.ToolButton
{
iconName: "object-rotate-left"
onClicked: viewer.list.currentItem.rotateLeft()
},
Maui.ToolButton
{
iconName: "object-rotate-right"
onClicked: viewer.list.currentItem.rotateRight()
},
Maui.ToolButton
{
iconName: "overflow-menu"
onClicked: viewerMenu.open()
onClicked: viewerMenu.popup()
}
]
headBar.leftContent: [
Maui.ToolButton
{
iconName: "document-share"
onClicked: isAndroid ? Maui.Android.shareDialog([pixViewer.currentPic.url]) :
shareDialog.show([pixViewer.currentPic.url])
},
Maui.ToolButton
{
iconName: "view-preview"
......@@ -48,7 +73,7 @@ Maui.Page
Maui.ToolButton
{
iconName: "filename-space-amarok"
iconName: "tag"
onClicked: toogleTagbar()
iconColor: tagBarVisible ? colorScheme.highlightColor: colorScheme.textColor
}
......@@ -77,16 +102,6 @@ Maui.Page
}
// Rectangle
// {
// id: shadow
// width: parent.width
// height: parent.height - headerBar.height
// y: headerBar.height
// color: textColor
// opacity: 0.6
// visible: shareDialog.opened
// }
backContain: GalleryRoll
{
......@@ -112,15 +127,6 @@ Maui.Page
footBar.colorScheme.backgroundColor: accentColor
footBar.colorScheme.textColor: altColorText
footBar.leftContent: Maui.ToolButton
{
iconName: "document-share"
iconColor: altColorText
onClicked: isAndroid ? Maui.Android.shareDialog([pixViewer.currentPic.url]) :
shareDialog.show([pixViewer.currentPic.url])
}
footBar.middleContent: [
Maui.ToolButton
......@@ -133,7 +139,8 @@ Maui.Page
Maui.ToolButton
{
iconName: "love"
iconColor: altColorText
colorScheme.highlightColor: "#ff557f";
iconColor: pixViewer.currentPicFav ? colorScheme.highlightColor : colorScheme.textColor
onClicked: pixViewer.currentPicFav = VIEWER.fav([pixViewer.currentPic.url])
},
......@@ -145,13 +152,6 @@ Maui.Page
}
]
footBar.rightContent : Maui.ToolButton
{
iconName: "document-save-as"
iconColor: altColorText
onClicked: editTools.visible ? editTools.close() : editTools.open()
}
Maui.Holder
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment