Commit 014db00a authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

More UI polishing

parent 50339054
......@@ -1983,7 +1983,7 @@ ApplicationWindow {
Container.forcedHeight: headerUserInfo.height;
}
DelegateAvatar {
size: Theme.iconSizeExtraLarge;
size: (Theme.iconSizeExtraLarge * 1.65);
fileItem: (pageUserInfo.userItem && pageUserInfo.userItem.profilePhoto ? pageUserInfo.userItem.profilePhoto.big : null);
anchors.horizontalCenter: parent.horizontalCenter;
}
......@@ -2297,35 +2297,27 @@ ApplicationWindow {
font.pixelSize: Theme.fontSizeExtraLarge;
anchors.right: parent.right;
}
RowContainer {
spacing: Theme.paddingLarge;
anchors.margins: Theme.paddingLarge;
DelegateAvatar {
size: (Theme.iconSizeExtraLarge * 1.65);
fileItem: (pageChatInfoBasicGroup.chatItem && pageChatInfoBasicGroup.chatItem.photo ? pageChatInfoBasicGroup.chatItem.photo.big : null);
anchors.horizontalCenter: parent.horizontalCenter;
}
LabelFixed {
text: (pageChatInfoBasicGroup.chatItem ? pageChatInfoBasicGroup.chatItem.title : "");
color: Theme.primaryColor;
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
horizontalAlignment: Text.AlignHCenter;
font.family: Theme.fontFamilyHeading;
font.pixelSize: Theme.fontSizeLarge;
ExtraAnchors.horizontalFill: parent;
DelegateAvatar {
size: Theme.iconSizeExtraLarge;
fileItem: (pageChatInfoBasicGroup.chatItem && pageChatInfoBasicGroup.chatItem.photo ? pageChatInfoBasicGroup.chatItem.photo.big : null);
anchors.verticalCenter: parent.verticalCenter;
}
LabelFixed {
text: (pageChatInfoBasicGroup.chatItem ? pageChatInfoBasicGroup.chatItem.title : "");
color: Theme.primaryColor;
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
font.family: Theme.fontFamilyHeading;
font.pixelSize: Theme.fontSizeLarge;
anchors.verticalCenter: parent.verticalCenter;
Container.horizontalStretch: 1;
}
}
RowContainer {
spacing: Theme.paddingLarge;
visible: pageChatInfoBasicGroup.creatorUserItem;
anchors.margins: Theme.paddingLarge;
ExtraAnchors.horizontalFill: parent;
anchors.horizontalCenter: parent.horizontalCenter;
ColumnContainer {
anchors.verticalCenter: parent.verticalCenter;
Container.horizontalStretch: 1;
LabelFixed {
text: qsTr ("Created by");
......@@ -2339,7 +2331,7 @@ ApplicationWindow {
: "<undefined>");
color: Theme.highlightColor;
font.underline: true;
font.pixelSize: Theme.fontSizeMedium;
font.pixelSize: Theme.fontSizeSmall;
anchors.right: parent.right;
}
}
......@@ -2379,7 +2371,7 @@ ApplicationWindow {
color: Theme.secondaryHighlightColor;
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
font.underline: true;
font.pixelSize: Theme.fontSizeLarge;
font.pixelSize: Theme.fontSizeSmall;
anchors.verticalCenter: parent.verticalCenter;
Container.horizontalStretch: 1;
}
......@@ -2539,25 +2531,19 @@ ApplicationWindow {
font.pixelSize: Theme.fontSizeExtraLarge;
anchors.right: parent.right;
}
RowContainer {
spacing: Theme.paddingLarge;
anchors.margins: Theme.paddingLarge;
DelegateAvatar {
size: (Theme.iconSizeExtraLarge * 1.65);
fileItem: (pageChatInfoSupergroup.chatItem && pageChatInfoSupergroup.chatItem.photo ? pageChatInfoSupergroup.chatItem.photo.big : null);
anchors.horizontalCenter: parent.horizontalCenter;
}
LabelFixed {
text: (pageChatInfoSupergroup.chatItem ? pageChatInfoSupergroup.chatItem.title : "");
color: Theme.primaryColor;
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
horizontalAlignment: Text.AlignHCenter;
font.family: Theme.fontFamilyHeading;
font.pixelSize: Theme.fontSizeLarge;
ExtraAnchors.horizontalFill: parent;
DelegateAvatar {
size: Theme.iconSizeExtraLarge;
fileItem: (pageChatInfoSupergroup.chatItem && pageChatInfoSupergroup.chatItem.photo ? pageChatInfoSupergroup.chatItem.photo.big : null);
anchors.verticalCenter: parent.verticalCenter;
}
LabelFixed {
text: (pageChatInfoSupergroup.chatItem ? pageChatInfoSupergroup.chatItem.title : "");
color: Theme.primaryColor;
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
font.family: Theme.fontFamilyHeading;
font.pixelSize: Theme.fontSizeLarge;
anchors.verticalCenter: parent.verticalCenter;
Container.horizontalStretch: 1;
}
}
LabelFixed {
text: (pageChatInfoSupergroup.supergroupItem ? pageChatInfoSupergroup.supergroupItem.description : "");
......@@ -2596,8 +2582,9 @@ ApplicationWindow {
LabelFixed {
text: (pageChatInfoSupergroup.supergroupItem ? "@" + pageChatInfoSupergroup.supergroupItem.username : "");
color: Theme.secondaryHighlightColor;
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
font.underline: true;
font.pixelSize: Theme.fontSizeLarge;
font.pixelSize: Theme.fontSizeSmall;
anchors.verticalCenter: parent.verticalCenter;
}
}
......@@ -2620,7 +2607,7 @@ ApplicationWindow {
color: Theme.secondaryHighlightColor;
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
font.underline: true;
font.pixelSize: Theme.fontSizeLarge;
font.pixelSize: Theme.fontSizeSmall;
anchors.verticalCenter: parent.verticalCenter;
Container.horizontalStretch: 1;
}
......
......@@ -28,99 +28,129 @@ Page {
key: "/apps/telegrame/avatar_shape";
defaultValue: "square";
}
Column {
spacing: Theme.paddingLarge;
anchors {
top: parent.top;
left: parent.left;
right: parent.right;
}
SilicaFlickable {
id: flickerSettings;
contentWidth: width;
contentHeight: (layoutSettings.height + layoutSettings.anchors.margins * 2);
anchors.fill: parent;
anchors.topMargin: headerSettings.height;
PageHeader {
title: qsTr ("Settings");
}
TextSwitch {
text: qsTr ("Quick sending of text messages");
description: qsTr ("Press Enter to send text messages (single-line)")
automaticCheck: true;
onCheckedChanged: {
configSendTextMsgOnEnterKey.value = checked;
}
ColumnContainer {
id: layoutSettings;
spacing: Theme.paddingLarge;
ExtraAnchors.topDock: parent;
Binding on checked { value: configSendTextMsgOnEnterKey.value; }
}
TextSwitch {
text: qsTr ("Include muted chats in unread count");
description: qsTr ("Whether unread chats should be included in cover page")
automaticCheck: true;
onCheckedChanged: {
configIncludeMutedChatsInUnreadCount.value = checked;
Item {
Container.forcedHeight: Theme.paddingMedium;
}
TextSwitch {
text: qsTr ("Quick sending of text messages");
description: qsTr ("Press Enter to send text messages (single-line)")
automaticCheck: true;
onCheckedChanged: {
configSendTextMsgOnEnterKey.value = checked;
}
Binding on checked { value: configIncludeMutedChatsInUnreadCount.value; }
}
TextSwitch {
text: qsTr ("Keep keyboard open after sending message");
description: qsTr ("By default Jolla keyboard auto-closes, but we can bypass this")
automaticCheck: true;
onCheckedChanged: {
configKeepKeyboardOpenAfterMsgSend.value = checked;
Binding on checked { value: configSendTextMsgOnEnterKey.value; }
}
TextSwitch {
text: qsTr ("Include muted chats in unread count");
description: qsTr ("Whether unread chats should be included in cover page")
automaticCheck: true;
onCheckedChanged: {
configIncludeMutedChatsInUnreadCount.value = checked;
}
Binding on checked { value: configKeepKeyboardOpenAfterMsgSend.value; }
}
LabelFixed {
text: qsTr ("Avatar shape");
anchors.horizontalCenter: parent.horizontalCenter;
}
RowContainer {
spacing: Theme.paddingLarge;
anchors.margins: Theme.paddingLarge;
ExtraAnchors.horizontalFill: parent;
Binding on checked { value: configIncludeMutedChatsInUnreadCount.value; }
}
TextSwitch {
text: qsTr ("Keep keyboard open after sending message");
description: qsTr ("By default Jolla keyboard auto-closes, but we can bypass this")
automaticCheck: true;
onCheckedChanged: {
configKeepKeyboardOpenAfterMsgSend.value = checked;
}
Repeater {
model: [
{ "shape" : "square", "mask" : "qrc:///images/mask_square.svg", "label" : qsTr ("Square (default)") },
{ "shape" : "rounded", "mask" : "qrc:///images/mask_rounded.svg", "label" : qsTr ("Rounded square") },
{ "shape" : "squircle", "mask" : "qrc:///images/mask_squircle.svg", "label" : qsTr ("Meego 'squircle'") },
{ "shape" : "circle", "mask" : "qrc:///images/mask_circle.svg", "label" : qsTr ("Full circle") },
];
delegate: MouseArea {
id: delegateShape;
implicitHeight: (width * 1.65);
Container.horizontalStretch: 1;
onClicked: {
configAvatarShape.value = modelData ["shape"];
}
Binding on checked { value: configKeepKeyboardOpenAfterMsgSend.value; }
}
LabelFixed {
text: qsTr ("Avatar shape");
anchors.horizontalCenter: parent.horizontalCenter;
}
RowContainer {
spacing: Theme.paddingSmall;
anchors.horizontalCenter: parent.horizontalCenter;
Rectangle {
color: Theme.secondaryHighlightColor;
radius: Theme.paddingMedium;
opacity: 0.15;
visible: (modelData ["shape"] === configAvatarShape.value);
antialiasing: true;
anchors.fill: parent;
}
ColumnContainer {
spacing: Theme.paddingMedium;
anchors.centerIn: parent;
Repeater {
model: [
{ "shape" : "square", "mask" : "qrc:///images/mask_square.svg", "label" : qsTr ("Square (default)") },
{ "shape" : "rounded", "mask" : "qrc:///images/mask_rounded.svg", "label" : qsTr ("Rounded square") },
{ "shape" : "squircle", "mask" : "qrc:///images/mask_squircle.svg", "label" : qsTr ("Meego 'squircle'") },
{ "shape" : "circle", "mask" : "qrc:///images/mask_circle.svg", "label" : qsTr ("Full circle") },
];
delegate: MouseArea {
id: delegateShape;
implicitWidth: (Theme.iconSizeLarge + Theme.paddingLarge * 2);
implicitHeight: (implicitWidth * 1.65);
onClicked: {
configAvatarShape.value = modelData ["shape"];
}
Image {
source: modelData ["mask"];
opacity: 0.65;
sourceSize: Qt.size (delegateShape.width * 0.65, delegateShape.width * 0.65);
anchors.horizontalCenter: parent.horizontalCenter;
Rectangle {
color: Theme.secondaryHighlightColor;
radius: Theme.paddingMedium;
opacity: 0.15;
visible: (modelData ["shape"] === configAvatarShape.value);
antialiasing: true;
anchors.fill: parent;
}
LabelFixed {
text: modelData ["label"].replace (/\s/g, "\n");
color: (modelData ["shape"] === configAvatarShape.value ? Theme.highlightColor : Theme.secondaryColor);
horizontalAlignment: Text.AlignHCenter;
font.pixelSize: Theme.fontSizeSmall;
anchors.horizontalCenter: parent.horizontalCenter;
ColumnContainer {
spacing: Theme.paddingMedium;
anchors.centerIn: parent;
Image {
source: modelData ["mask"];
opacity: 0.65;
sourceSize: Qt.size (Theme.iconSizeLarge, Theme.iconSizeLarge);
anchors.horizontalCenter: parent.horizontalCenter;
}
LabelFixed {
text: modelData ["label"].replace (/\s/g, "\n");
color: (modelData ["shape"] === configAvatarShape.value ? Theme.highlightColor : Theme.secondaryColor);
horizontalAlignment: Text.AlignHCenter;
font.pixelSize: Theme.fontSizeExtraSmall;
anchors.horizontalCenter: parent.horizontalCenter;
}
}
}
}
}
Item {
Container.forcedHeight: Theme.paddingMedium;
}
}
}
VerticalScrollDecorator {
flickable: flickerSettings;
}
Rectangle {
id: headerSettings;
color: Qt.rgba (1.0 - Theme.primaryColor.r, 1.0 - Theme.primaryColor.g, 1.0 - Theme.primaryColor.b, 0.85);
implicitHeight: (titleSettings.height + titleSettings.anchors.margins * 2);
ExtraAnchors.topDock: parent;
LabelFixed {
id: titleSettings;
text: qsTr ("Settings");
color: Theme.highlightColor;
horizontalAlignment: Text.AlignRight;
font {
family: Theme.fontFamilyHeading;
pixelSize: Theme.fontSizeLarge;
}
anchors.margins: Theme.paddingLarge;
anchors.verticalCenter: parent.verticalCenter;
ExtraAnchors.horizontalFill: parent;
}
}
}
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