Commit a4883c4d authored by Camilo Higuita's avatar Camilo Higuita

initial work on viewer view and layout the features on the ui #4

parent 4550eab7
...@@ -38,6 +38,7 @@ Kirigami.ApplicationWindow ...@@ -38,6 +38,7 @@ Kirigami.ApplicationWindow
/*UI PROPS*/ /*UI PROPS*/
readonly property int contentMargins: isMobile ? 8 : 10 readonly property int contentMargins: isMobile ? 8 : 10
readonly property int defaultFontSize: Kirigami.Theme.defaultFont.pointSize readonly property int defaultFontSize: Kirigami.Theme.defaultFont.pointSize
readonly property var fontSizes: ({ readonly property var fontSizes: ({
...@@ -56,7 +57,7 @@ Kirigami.ApplicationWindow ...@@ -56,7 +57,7 @@ Kirigami.ApplicationWindow
property string viewBackgroundColor: Kirigami.Theme.viewBackgroundColor property string viewBackgroundColor: Kirigami.Theme.viewBackgroundColor
property string altColor: Kirigami.Theme.complementaryBackgroundColor property string altColor: Kirigami.Theme.complementaryBackgroundColor
property int iconSize : Kirigami.Units.iconSizes.medium
header: PixsBar header: PixsBar
{ {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<qresource prefix="/"> <qresource prefix="/">
<file>main.qml</file> <file>main.qml</file>
<file>view_models/PixGrid.qml</file> <file>view_models/PixGrid.qml</file>
<file>widgets/EditTools.qml</file>
<file>utils/Icon.qml</file> <file>utils/Icon.qml</file>
<file>utils/Icons.js</file> <file>utils/Icons.js</file>
<file>utils/materialdesignicons-webfont.ttf</file> <file>utils/materialdesignicons-webfont.ttf</file>
...@@ -25,5 +24,8 @@ ...@@ -25,5 +24,8 @@
<file>widgets/views/Settings/SettingsView.qml</file> <file>widgets/views/Settings/SettingsView.qml</file>
<file>widgets/views/Folders/FoldersGrid.qml</file> <file>widgets/views/Folders/FoldersGrid.qml</file>
<file>widgets/views/Folders/FoldersDelegate.qml</file> <file>widgets/views/Folders/FoldersDelegate.qml</file>
<file>widgets/views/Viewer/EditTools.qml</file>
<file>widgets/views/Viewer/Viewer.qml</file>
<file>../assets/f76477106.jpg</file>
</qresource> </qresource>
</RCC> </RCC>
...@@ -73,6 +73,8 @@ Page ...@@ -73,6 +73,8 @@ Page
id: headerbarActionsLeft id: headerbarActionsLeft
Layout.alignment : Qt.AlignLeft Layout.alignment : Qt.AlignLeft
Layout.leftMargin: headerbarExit ? 0 : contentMargins Layout.leftMargin: headerbarExit ? 0 : contentMargins
spacing: contentMargins
} }
Label Label
...@@ -93,6 +95,7 @@ Page ...@@ -93,6 +95,7 @@ Page
Row Row
{ {
id: headerbarActionsRight id: headerbarActionsRight
spacing: contentMargins
Layout.alignment : Qt.AlignRight Layout.alignment : Qt.AlignRight
Layout.rightMargin: contentMargins Layout.rightMargin: contentMargins
} }
......
...@@ -20,6 +20,7 @@ ToolBar ...@@ -20,6 +20,7 @@ ToolBar
signal foldersViewClicked() signal foldersViewClicked()
signal searchViewClicked() signal searchViewClicked()
signal menuClicked()
id: pixBar id: pixBar
...@@ -27,6 +28,29 @@ ToolBar ...@@ -27,6 +28,29 @@ ToolBar
{ {
anchors.fill: parent anchors.fill: parent
Item
{
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
Layout.fillHeight: true
PixButton
{
anchors.centerIn: parent
iconName: "application-menu"
onClicked: menuClicked()
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Menu")
}
}
Item { Layout.fillWidth: true }
Item Item
{ {
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
...@@ -50,8 +74,6 @@ ToolBar ...@@ -50,8 +74,6 @@ ToolBar
} }
} }
Item { Layout.fillWidth: true }
Item Item
{ {
Layout.fillWidth: true Layout.fillWidth: true
......
...@@ -9,8 +9,8 @@ GridView ...@@ -9,8 +9,8 @@ GridView
clip: true clip: true
height: parent.height height: parent.height
width: parent.width width: parent.width
cellHeight: folderSize cellHeight: gridSize+contentMargins
cellWidth: folderSize cellWidth: gridSize+contentMargins
focus: true focus: true
......
...@@ -2,7 +2,6 @@ import QtQuick 2.0 ...@@ -2,7 +2,6 @@ import QtQuick 2.0
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import "../../../view_models" import "../../../view_models"
PixPage PixPage
{ {
......
import QtQuick 2.9 import QtQuick 2.9
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../../view_models"
Rectangle
PixPage
{ {
headerbarTitle: "drawing.jpg"
headerbarExit: false
headerBarRight: [
PixButton
{
iconName: "edit-rename"
},
PixButton
{
iconName: "documentinfo"
}
]
headerBarLeft: [
PixButton
{
iconName: "document-save-as"
},
PixButton
{
iconName: "draw-text"
}
]
footer: ToolBar
{
position: ToolBar.Footer
RowLayout
{
anchors.fill: parent
Item
{
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
Layout.fillHeight: true
PixButton
{
anchors.centerIn: parent
iconName: "document-share"
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Share")
}
}
Item { Layout.fillWidth: true }
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize*2
PixButton
{
anchors.centerIn: parent
iconName: "go-previous"
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Previous")
}
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize*2
PixButton
{
anchors.centerIn: parent
iconName: "love"
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Fav")
}
}
Item
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumWidth: iconSize*2
PixButton
{
anchors.centerIn: parent
iconName: "go-next"
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Next")
}
}
Item { Layout.fillWidth: true }
Item
{
Layout.alignment: Qt.AlignRight
Layout.fillWidth: true
Layout.fillHeight: true
PixButton
{
anchors.centerIn: parent
iconName: "view-fullscreen"
hoverEnabled: !isMobile
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: qsTr("Fullscreen")
}
}
}
}
content: Viewer
{
}
} }
import QtQuick 2.0
import QtQuick.Controls 2.2
Image {
height: parent.height
width: parent.width
source: "qrc:/../assets/f76477106.jpg"
fillMode: Image.PreserveAspectFit
}
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