Compare commits

..

No commits in common. "master" and "profileAddEdit" have entirely different histories.

40 changed files with 1009 additions and 757 deletions

View File

@ -4,6 +4,7 @@ import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import "fonts/Twemoji.js" as T
import "theme"
import "fonts"
@ -39,23 +40,12 @@ Rectangle {
Image {
id: ico
source: icon!="" ? gcd.assetPath + "core/"+icon+".webp" : "";
source: icon!="" ? gcd.assetPath + "fontawesome/"+icon+".svg" : "";
visible: icon != ""
height: button.height / 2
sourceSize.height: button.height / 2
ColorOverlay{
id: iconColorOverlay
color: textColor
anchors.fill: ico
source: ico
antialiasing: true
smooth: true
}
}
Label {
id: buttonText
font.family: Fonts.applicationFontRegular.name

View File

@ -14,9 +14,6 @@ TextField {
font.pixelSize: Theme.secondaryTextSize * gcd.themeScale
width: parent.width - 20
// IMPORTANT: Setting a dynamic height on the internal button widget caused it to crash on Android when
// resized (smaller), so we set an explicit height on TextField which seems to resolve the issue.
height: font.pixelSize + 20
property string icon
property string button_text
signal clicked

View File

@ -1,31 +0,0 @@
import QtQuick 2.13
import "." as Opaque
import "theme"
Opaque.Column {
id: root
//: Show
readonly property string strShow: qsTr("collapser-show")
//: Hide
readonly property string strHide: qsTr("collapser-hide")
property string textShow: strShow
property string textHide: strHide
property bool expanded: false
height: expanded ? childrenRect.height + 2 * root.padding : lblTitle.height + root.padding + root.spacing
Behavior on height { PropertyAnimation {} }
clip: true
Opaque.Label {
id: lblTitle
text: root.expanded ? root.textHide + " ▲" : root.textShow + " ▼"
header: true
MouseArea {
anchors.fill: parent
onClicked: root.expanded = !root.expanded
}
}
}

View File

@ -1,9 +0,0 @@
import QtQuick 2.13
import "." as Opaque
import "theme"
Column {
padding: Theme.paddingStandard
spacing: Theme.paddingSmall
}

View File

@ -5,18 +5,18 @@ import QtGraphicalEffects 1.12
import "theme"
// Assumes data comes in a model like
// model: ListModel {
// ListElement { text: qsTr("locale-en"); value: "en" } }
ComboBox {
id: control
height: Theme.textNormalPt + Theme.paddingMinimal * 2
font.pointSize: Theme.textNormalPt
height: 30 * gcd.themeScale
// visible item
contentItem: Label {
contentItem: ScalingLabel {
id: displayItem
leftPadding: Theme.paddingStandard
leftPadding: 10 * gcd.themeScale
text: control.model.get(control.currentIndex)["text"]
font: control.font
@ -62,7 +62,7 @@ ComboBox {
Icon {
iconColor: Theme.toolbarIconColor
source: gcd.assetPath + "core/chevron_left-24px.webp"
source: gcd.assetPath + "core/chevron_left-24px.svg"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
@ -78,17 +78,17 @@ ComboBox {
delegate: ItemDelegate {
width: control.width
highlighted: control.highlightedIndex === index
height: ciText.height + 2 * Theme.paddingMinimal
height: ciText.height + (4 * gcd.themeScale)
contentItem:
Rectangle {
anchors.fill: parent
color: control.highlightedIndex === index ? Theme.backgroundHilightElementColor : Theme.backgroundMainColor
Label {
ScalingLabel {
id: ciText
anchors.verticalCenter: parent.verticalCenter
anchors.left:parent.left
anchors.leftMargin: Theme.paddingStandard
anchors.leftMargin: 10 * gcd.themeScale
text: model["text"] //control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
color: Theme.mainTextColor

58
EllipsisLabel.qml Normal file
View File

@ -0,0 +1,58 @@
import QtQuick 2.7
import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import CustomQmlTypes 1.0
import "." as Widgets
import "theme"
// Needs the parent to have an onWidthChanged that calls .textResize()
Item {
property string text
property alias color: label.color
property alias size: label.font.pixelSize
property alias weight: label.font.weight
property alias strikeout: label.font.strikeout
property alias font: label.font
property alias topPadding: label.topPadding
property alias leftPadding: label.leftPadding
property int extraPadding: 0
property Item container: parent
height: textMetric.height
width: textMetric.width + 10
anchors.leftMargin: 10
Label {
id: label
textFormat: Text.PlainText
elide: Text.ElideRight
text: textMetric.text
}
TextMetrics {
id: textMetric
text: text
font: label.font
}
onTextChanged: {
textResize()
}
function textResize() {
textMetric.text = text
var i = 2
var containerWidth = container != null ? container.width : 50
// - 30 for padding
while (textMetric.width > containerWidth - ((30 + extraPadding) * gcd.themeScale) && textMetric.width > 50) {
textMetric.text = text.slice(0, text.length - (i * 3)) + "..."
i++
}
}
}

View File

@ -14,18 +14,11 @@ Item {
id: root
implicitHeight: 0
height: implicitHeight
property int size: 32
property int size: 24
property int requestedHeight: size * 8
property string morph: "clw"
property string color: "v1"
// can't bind to the width of the category bar when narrow=true, so we have to calculate it ourselves
// narrowMode when (width of emoji drawer) < (category icon size + padding)
// * (number of categories, minus one which is a VLine)
// - padding (no spacing at the end)
// + 2 * (left/right margin size)
property bool narrowMode: width < (root.size + categoryRow.spacing) * (categoryRow.children.length - 1) - categoryRow.spacing + categoryContainer.anchors.margins * 2
property bool searchMode: false
property string catimgpath: gcd.assetPath + "emojidrawer/" + (gcd.theme != "dark" ? "lightmode_" : "darkmode_")
property bool narrowMode: width < (txtSearch.width + root.size * 14 + btnX.width)
signal picked(string shortcode)
signal slideopen()
@ -34,7 +27,6 @@ Item {
Rectangle {
color: Theme.backgroundPaneColor
border.color: Theme.dividerColor
anchors.fill: parent
}
@ -54,149 +46,124 @@ Item {
duration: 400;
}
Button {
id: btnX
anchors.top: parent.top
anchors.right: parent.right
text: "x"
onClicked: animClose.start()
}
ColumnLayout {
id: categoryContainer
anchors.fill: parent
anchors.margins: 10
RowLayout {
id: categoryRow
spacing: 10
Row {
ImageButton {
tooltip: qsTr("search")
source: gcd.assetPath + "core/search-24px.webp"
size: root.size
color: root.searchMode ? Theme.dividerColor : "transparent"
onClicked: {
root.searchMode = !root.searchMode
if (!root.searchMode) txtSearch.text = ""
else txtSearch.focus = true
}
imgSrc.visible: false
ColorOverlay {
color: root.searchMode ? Theme.backgroundMainColor : Theme.dividerColor
anchors.fill: parent.imgSrc
source: parent.imgSrc
antialiasing: true
smooth: true
}
}
TextField {
id: txtSearch
visible: root.searchMode
implicitWidth: 200
implicitHeight: root.size
//: Search...
placeholderText: qsTr("search")
onTextChanged: {
if (text == "") emojiModel.model = folder_expressions
else emojiModel.model = folder_search
emojiModel.updatefilters()
}
font.pixelSize: root.size * 0.5
background: Rectangle {
color: Theme.dividerColor
}
}
TextField {
id: txtSearch
//: Search...
placeholderText: qsTr("search")
onTextChanged: {
if (text == "") emojiModel.model = folder_expressions
else emojiModel.model = folder_search
emojiModel.updatefilters()
}
}
ImageButton {
id: btnEmojiExpressionsGroup
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: Expressions
tooltip: qsTr("emojicat-expressions")
source: catimgpath + "big_smile.webp"
source: gcd.assetPath + "mutstd/smile.webp"
size: root.size
onClicked: emojiModel.model = folder_expressions
}
ImageButton {
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: Activities
tooltip: qsTr("emojicat-activities")
source: catimgpath + "volleyball.webp"
source: gcd.assetPath + "mutstd/artist_r1.webp"
size: root.size
onClicked: emojiModel.model = folder_activities_clothing
}
ImageButton {
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: Food, drink & herbs
tooltip: qsTr("emojicat-food")
source: catimgpath + "red_apple.webp"
source: gcd.assetPath + "mutstd/red_apple.webp"
size: root.size
onClicked: emojiModel.model = folder_food_drink_herbs
}
ImageButton {
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: Gender, relationships & sexuality
tooltip: qsTr("emojicat-gender")
size: root.size
source: catimgpath + "transgender_symbol.webp"
source: gcd.assetPath + "mutstd/pride_100.webp"
onClicked: emojiModel.model = folder_gsr
}
ImageButton {
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: Nature and effects
tooltip: qsTr("emojicat-nature")
source: catimgpath + "crescent.webp"
source: gcd.assetPath + "mutstd/sun_behind_small_cloud.webp"
size: root.size
onClicked: emojiModel.model = folder_nature
}
ImageButton {
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: Objects
tooltip: qsTr("emojicat-objects")
source: catimgpath + "light_bulb.webp"
source: gcd.assetPath + "mutstd/crystal_ball.webp"
size: root.size
onClicked: emojiModel.model = folder_objects
}
ImageButton {
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: People and animals
tooltip: qsTr("emojicat-people")
source: catimgpath + "bear.webp"
source: gcd.assetPath + "mutstd/crow.webp"
size: root.size
onClicked: emojiModel.model = folder_people
}
ImageButton {
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: Symbols
tooltip: qsTr("emojicat-symbols")
source: catimgpath + "pentacle.webp"
source: gcd.assetPath + "mutstd/purple_heart.webp"
size: root.size
onClicked: emojiModel.model = folder_symbols
}
ImageButton {
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: Travel & places
tooltip: qsTr("emojicat-travel")
source: catimgpath + "airplane.webp"
source: gcd.assetPath + "mutstd/airplane.webp"
size: root.size
onClicked: emojiModel.model = folder_travel_places
}
ImageButton {
visible: !root.narrowMode && !root.searchMode
visible: !root.narrowMode
//: Miscellaneous
tooltip: qsTr("emojicat-misc")
source: catimgpath + "hash.webp"
source: gcd.assetPath + "mutstd/hash_char.webp"
size: root.size
onClicked: emojiModel.model = folder_utils
}
Rectangle {
width: 2
height: root.size * 0.8
color: Theme.dividerColor
visible: !root.narrowMode && !root.searchMode
ImageButton {
visible: !root.narrowMode
id: btnUndefinedGroup
// (no tooltip; this is a catchall group meant to detect unclassified emoji during development)
//TODO: remove this category upon finalizing the Emoji Drawer
source: gcd.assetPath + "mutstd/undefined_character.webp"
size: root.size
onClicked: emojiModel.model = folder_other
}
Item {
visible: root.narrowMode && !root.searchMode
visible: root.narrowMode
height: root.size
width: root.size
@ -206,16 +173,17 @@ Item {
source: cats[index].source
property int index: 0
property var cats: [
{source: catimgpath + "big_smile.webp", model: folder_expressions},
{source: catimgpath + "volleyball.webp", model: folder_activities_clothing},
{source: catimgpath + "red_apple.webp", model: folder_food_drink_herbs},
{source: catimgpath + "transgender_symbol.webp", model: folder_gsr},
{source: catimgpath + "crescent.webp", model: folder_nature},
{source: catimgpath + "light_bulb.webp", model: folder_objects},
{source: catimgpath + "bear.webp", model: folder_people},
{source: catimgpath + "pentacle.webp", model: folder_symbols},
{source: catimgpath + "airplane.webp", model: folder_travel_places},
{source: catimgpath + "hash.webp", model: folder_utils}
{source: gcd.assetPath + "mutstd/smile.webp", model: folder_expressions},
{source: gcd.assetPath + "mutstd/artist_r1.webp", model: folder_activities_clothing},
{source: gcd.assetPath + "mutstd/red_apple.webp", model: folder_food_drink_herbs},
{source: gcd.assetPath + "mutstd/pride_100.webp", model: folder_gsr},
{source: gcd.assetPath + "mutstd/sun_behind_small_cloud.webp", model: folder_nature},
{source: gcd.assetPath + "mutstd/crystal_ball.webp", model: folder_objects},
{source: gcd.assetPath + "mutstd/crow.webp", model: folder_people},
{source: gcd.assetPath + "mutstd/purple_heart.webp", model: folder_symbols},
{source: gcd.assetPath + "mutstd/airplane.webp", model: folder_travel_places},
{source: gcd.assetPath + "mutstd/hash_char.webp", model: folder_utils},
{source: gcd.assetPath + "mutstd/undefined_character.webp", model: folder_other}
]
height: root.size * (maCatRot.pressed ? 0.8 : 1.0)
width: root.size * (maCatRot.pressed ? 0.8 : 1.0)
@ -315,8 +283,8 @@ Item {
Layout.fillWidth: true
Layout.fillHeight: true
height: root.size * 3
cellWidth: root.size * 1.2
cellHeight: root.size * 1.2
cellWidth: root.size
cellHeight: root.size
clip: true
ScrollBar.vertical: ScrollBar {}
maximumFlickVelocity: 1250
@ -337,6 +305,7 @@ Item {
ListModel { id: folder_symbols }
ListModel { id: folder_travel_places }
ListModel { id: folder_utils }
ListModel { id: folder_other }
ListModel { id: folder_search }
DelegateModel {
@ -344,14 +313,14 @@ Item {
model: folder_expressions
delegate: Item {
width: root.size * 1.2
height: root.size * 1.2
width: root.size
height: root.size
Image {
id: img
//source: "file://" + gcd.binaryPath + "/assets/mutstd/" + code + ".webp"
source: gcd.assetPath + "mutstd/" + code + ".webp"
width: root.size * (mouseArea.pressed ? 0.9 : 1)
width: root.size * (mouseArea.pressed ? 0.7 : 0.8)
height: width
anchors.centerIn: parent
property string shortcode: code
@ -382,6 +351,7 @@ Item {
folder_symbols.clear()
folder_travel_places.clear()
folder_utils.clear()
folder_other.clear()
folder_search.clear()
}
@ -399,7 +369,7 @@ Item {
continue;
}
var model = folder_expressions
var model = folder_other
if (txtSearch.text == "") {
switch(Mutant.standard.manifest[i].cat) {
case "activities_clothing": model = folder_activities_clothing; break;

View File

@ -3,7 +3,7 @@ import "theme"
Column {
width: parent.width
anchors.horizontalCenter: typeof(Layout) == undefined ? parent.horizontalCenter : undefined
anchors.horizontalCenter: parent.horizontalCenter
Rectangle {
height: 10
@ -11,13 +11,15 @@ Column {
width: parent.width
}
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
height: 1
width: parent.width
width: parent.width * 0.95
color: Theme.dropShadowColor
}
Rectangle {
height: 10
color:"transparent"

View File

@ -4,6 +4,7 @@ import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import "fonts/Twemoji.js" as T
import "." as Widgets
import "theme"
@ -20,8 +21,6 @@ Rectangle {
property alias iconColor: iconColorOverlay.color
property alias source: srcImg.source
property alias sourceWidth: srcImg.sourceSize.width
property alias sourceHeight: srcImg.sourceSize.height
property real rotationAngle: 0.0
@ -29,8 +28,14 @@ Rectangle {
signal hover(bool hover)
//property int horizontalPadding: 0
//property int verticalPadding: 0
property int size: Math.min(height, width)
//property int innerHeight: height - (verticalPadding*2)
//property int innerWidth: width - (horizontalPadding*2)
Image {
id: srcImg
anchors.verticalCenter: parent.verticalCenter

View File

@ -1,9 +0,0 @@
All code in this repository, unless otherwise indicated, is distributed under the following license:
Copyright 2020 Open Privacy Research Society
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -12,10 +12,10 @@ Item {
property string source
property alias badgeColor: badge.color
height: Theme.contactPortraitSize
width: Theme.contactPortraitSize
implicitWidth: Theme.contactPortraitSize
implicitHeight: Theme.contactPortraitSize
property int size: Theme.contactPortraitSize
property real logscale: 4 * Math.log10(gcd.themeScale + 1)
property int baseWidth: size * logscale
height: size * logscale
property alias portraitBorderColor: mainImage.color
property alias portraitColor: imageInner.color
@ -26,13 +26,16 @@ Item {
property alias overlayColor: iconColorOverlay.color
property real rotationAngle: 0.0
implicitWidth: baseWidth
implicitHeight: baseWidth
Rectangle {
id: mainImage
//anchors.leftMargin: baseWidth * 0.1
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: parent.width * 0.8
width: baseWidth * 0.8
height: width
anchors.verticalCenter: parent.verticalCenter
color: Theme.portraitOfflineBorderColor
radius: width / 2

View File

@ -5,7 +5,7 @@ import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import CustomQmlTypes 1.0
import "styles"
import "." as Opaque
import "." as Widgets
import "theme"
import "../opaque/fonts"
import QtQuick.Controls 1.4
@ -13,9 +13,10 @@ import QtQuick.Controls.Styles 1.4
Item {
id: crItem
implicitHeight: Math.max(cnMetric.height + onionMetric.height, Theme.contactPortraitSize) + Theme.paddingSmall * 2
implicitHeight: Theme.contactPortraitSize * logscale + 3
height: implicitHeight
property real logscale: 4 * Math.log10(gcd.themeScale + 1)
property string displayName
property alias image: portrait.source
property string handle
@ -42,75 +43,62 @@ Item {
property alias content: extraMeta.children
property alias portraitOverlayColor: portrait.overlayColor
property alias portraitPerformTransform: portrait.performTransform
signal clicked(string handle)
// Manual columnlayout using anchors!
// Elements on the left are bound left, elements on the right, right
// Center element (contact name/onion) gets whatever space is left
// because it can elide text when it becomes too small :)
// crRect.left <- portrait <- portraitMeta -> extraMeta -> crRect.right
Rectangle {
Rectangle { // CONTACT ENTRY BACKGROUND COLOR
id: crRect
anchors.left: parent.left
anchors.right: parent.right
height: crItem.height
width: parent.width
// CONTACT ENTRY BACKGROUND COLOR
color: isHover ? crItem.rowHilightColor : (isActive ? crItem.rowHilightColor : crItem.rowColor)
Portrait {
id: portrait
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: Theme.paddingStandard
anchors.leftMargin: 25 * logscale
}
Column {
ColumnLayout {
id: portraitMeta
anchors.left: portrait.right
anchors.right: extraMeta.left
anchors.leftMargin: Theme.paddingStandard
anchors.right: parent.right
anchors.leftMargin: 4 * logscale
anchors.verticalCenter: parent.verticalCenter
Opaque.Label { // CONTACT NAME
spacing: 2 * gcd.themeScale
EllipsisLabel { // CONTACT NAME
id: cn
width: parent.width
elide: Text.ElideRight
header: true
anchors.right: parent.right
anchors.left: parent.left
size: Theme.usernameSize * gcd.themeScale
font.family: Fonts.applicationFontExtraBold.name
font.styleName: "ExtraBold"
text: displayName
wrapMode: Text.NoWrap
}
TextMetrics {
id: cnMetric
font: cn.font
text: cn.text
}
Opaque.Label { // Onion
EllipsisLabel { // Onion
id: onion
text: handle
width: parent.width
elide: Text.ElideRight
wrapMode: Text.NoWrap
anchors.right: parent.right
anchors.left: parent.left
size: Theme.secondaryTextSize * gcd.themeScale
}
TextMetrics {
id: onionMetric
font: onion.font
text: onion.text
onWidthChanged: {
cn.textResize()
onion.textResize()
}
}
Column {
id: extraMeta
width: Theme.uiIconSizeS + 2 * Theme.paddingMinimal
anchors.right: parent.right
anchors.left: portraitMeta.right
anchors.verticalCenter: parent.verticalCenter
}
}
@ -129,11 +117,6 @@ Item {
onExited: {
isHover = false
}
onCanceled: {
isHover = false
}
}
Connections { // UPDATE UNREAD MESSAGES COUNTER

View File

@ -3,7 +3,6 @@ import QtQuick 2.7
import QtQuick.Controls 2.13
import "theme"
import "fonts"
import "." as Opaque
RadioButton {
id: control
@ -30,11 +29,12 @@ RadioButton {
}
}
contentItem: Opaque.Label {
size: Theme.textMediumPt
contentItem: ScalingLabel {
size: Theme.chatMetaTextSize
color: textColor
text: control.text
bold: true
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
leftPadding: control.indicator.width + control.spacing
}

View File

@ -3,7 +3,6 @@ import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import QtQuick.Controls 1.4
import "theme"
GridLayout {
@ -11,7 +10,7 @@ GridLayout {
// have children ... control weather to stack or row them
// n * minWidth determin
property int minCellWidth: Theme.sidePaneMinSize * gcd.themeScale
property int minCellWidth: 500
onWidthChanged: resizeCheck()

View File

@ -7,18 +7,13 @@ import QtQuick.Window 2.11
import "theme"
import "fonts"
// Defaults to normal size text. doesn't do its own padding!
// Setting header:true switches to header sized and bolded text
Label {
font.pointSize: size
wrapMode: multiline ? Text.WordWrap : Text.NoWrap
elide: Text.ElideRight
font.pixelSize: gcd.themeScale * size
wrapMode: Text.WordWrap
color: Theme.mainTextColor
textFormat: Text.PlainText
property bool header: false
property real size: header ? Theme.textHeaderPt : Theme.textMediumPt
property bool bold: header
property bool multiline: true
property real size: 12
property bool bold: false
font.family: bold ? Fonts.applicationFontRegular.name : Fonts.applicationFontBold.name
font.styleName: bold ? "Bold" : ""

View File

@ -10,8 +10,8 @@ import "../const"
T.ScrollBar {
palette.dark: Theme.scrollbarDefaultColor
palette.mid: Theme.scrollbarActiveColor
palette.dark: Theme.defaultButtonColor
palette.mid: Theme.dividerColor
id: control
@ -20,7 +20,6 @@ T.ScrollBar {
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
width: 10
padding: 2
visible: control.policy !== T.ScrollBar.AlwaysOff && control.size < 1.0
@ -29,7 +28,7 @@ T.ScrollBar {
implicitHeight: control.interactive ? 6 : 2
radius: width / 2
color: control.pressed ? control.palette.mid : control.palette.dark
color: control.pressed ? control.palette.dark : control.palette.mid
opacity: 1.0
}
}

View File

@ -15,9 +15,10 @@ import "../opaque/theme"
Column {
id: tehcol
width: parent.width - 2 * parent.padding
width: parent.width - 20
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.paddingSmall
padding: 10
spacing: 10
property bool inline: true
property bool last: false
@ -30,28 +31,31 @@ Column {
Grid {
id: container
columns: inline ? 2 : 1
spacing: Theme.paddingStandard
padding: Theme.paddingStandard
spacing: 10 * gcd.themeScale
padding: 10 * gcd.themeScale
width: parent.width
property int gridWidth: (inline ? (width - spacing)/2 : width) - 2*padding
property int gridWidth: inline ? (parent.width / 2) - (20 * gcd.themeScale) : parent.width - (20 * gcd.themeScale)
anchors.horizontalCenter: parent.horizontalCenter
Column {
Opaque.Label {
Opaque.ScalingLabel {
id: settingLabel
width: container.gridWidth
header: true
color: Theme.mainTextColor
size: Theme.secondaryTextSize * gcd.themeScale
font.weight: Font.Bold
visible: text != ""
}
Opaque.Label {
Opaque.ScalingLabel {
id: settingDescriptionLabel
width: container.gridWidth
size: Theme.textSmallPt
color: Theme.mainTextColor
size: Theme.chatMetaTextSize * gcd.themeScale
visible: settingDescriptionLabel.text != ""
topPadding:10
}
@ -67,8 +71,5 @@ Column {
}
Opaque.HLine {
width: parent.width - 20
visible: !last
}
Opaque.HLine { visible: !last }
}

View File

@ -12,13 +12,28 @@ import "../opaque/styles"
import "../opaque/theme"
ColumnLayout { // settingsList
id: root
anchors.right: parent.right
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.topMargin: 20
Flickable {
id: flick
boundsBehavior: Flickable.StopAtBounds
contentWidth: parent.width
clip:true
flickableDirection: Flickable.VerticalFlick
property alias settings: flick.children
Flickable {
anchors.fill: parent
id: flick
boundsBehavior: Flickable.StopAtBounds
clip:true
contentWidth: root.width
contentHeight: root.height
// Settings go here in a col
}
}

42
Tab.qml Normal file
View File

@ -0,0 +1,42 @@
import QtGraphicalEffects 1.0
import QtQuick 2.7
import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import "fonts/Twemoji.js" as T
import "theme"
import "fonts"
import "." as Opaque
Rectangle {
id: root
property bool active: false
property alias text: label.text
color: Theme.backgroundMainColor
signal clicked
height: label.height
Opaque.ScalingLabel {
id: label
anchors.horizontalCenter: parent.horizontalCenter
color: root.active ? Theme.mainTextColor : Theme.altTextColor
size: Theme.tabSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
}
MouseArea {
anchors.fill: parent
onClicked: {
parent.focus = true
parent.clicked()
}
}
}

View File

@ -1,44 +0,0 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import "." as Opaque
import "./theme"
// Tabs.qml
//
// Example 1:
// Tabs {
// model: [qsTr("tab1-name"), qsTr("tab2-name"), qsTr("tab3-name")]
// onCurrentIndexChanged: {
// //...eg: loader.source = filenames[currentIndex]
// }
// }
ListView {
id: root
// properties
property color highlightColor: Theme.dividerColor
// contents & appearance config
model: ["your", "model", "here"]
delegate: Opaque.Label {
// contents & appearance config
text: model.modelData
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
size: Theme.textSmallPt
bold: true
// functionality
MouseArea { anchors.fill: parent; onClicked: root.currentIndex = index; }
width: root.width / root.model.length
}
highlight: Rectangle { id: hl; radius: 5; color: root.highlightColor; x: 0; width: root.width / root.model.length;}
// functionality
height: Theme.uiIconSizeS
orientation: Qt.Horizontal
interactive: true
highlightFollowsCurrentItem: true
boundsBehavior: Flickable.StopAtBounds
}

View File

@ -3,24 +3,30 @@ import QtQuick.Controls.Styles 1.4
import QtQuick 2.12
import "theme"
// ToggleSwtch implements a stylized toggle switch.
// ToggleSwtch implements a stylized toggle switch. It requires the user create a function called onToggled to
// perform any additional operations needed to define the behavior of the toggle switch
Switch {
property bool isToggled
property var onToggled: function () { console.log("In Superclass") };
style: SwitchStyle {
handle: Rectangle {
implicitWidth: 25
implicitHeight: 25
radius: width*0.5
color: Theme.toggleColor
border.color: checked ? Theme.toggleOnColor :Theme.toggleOffColor
border.color: isToggled ? Theme.toggleOnColor :Theme.toggleOffColor
border.width:5
}
groove: Rectangle {
implicitWidth: 50
implicitHeight: 25
radius: 25*0.5
color: checked ? Theme.toggleOnColor :Theme.toggleOffColor
color: isToggled ? Theme.toggleOnColor :Theme.toggleOffColor
}
}
onClicked: function() {isToggled = !isToggled; onToggled()}
}

View File

@ -4,9 +4,11 @@ import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import "." as Opaque
import "fonts/Twemoji.js" as T
import "." as Widgets
import "theme"
import "fonts"
import "../opaque/fonts"
Rectangle { // Global Toolbar
id: toolbar
@ -14,10 +16,7 @@ Rectangle { // Global Toolbar
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: 2 * Theme.paddingSmall + Math.max(iconSize, paneTitleTextMetric.height)
property int iconSize: Theme.uiIconSizeM
height: 35 * gcd.themeScale
Layout.minimumHeight: height
@ -28,7 +27,7 @@ Rectangle { // Global Toolbar
property alias backVisible: btnLeftBack.visible
property alias rightMenuVisible: btnRightMenu.visible
property int rightPaneWidth: 0
property alias titleWidth: paneArea.width
signal leftMenu()
@ -38,13 +37,13 @@ Rectangle { // Global Toolbar
Icon {
id: btnLeftMenu
iconColor: Theme.toolbarIconColor
source: gcd.assetPath + "core/menu-24px.webp"
source: gcd.assetPath + "core/menu-24px.svg"
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
width: toolbar.iconSize
height: toolbar.iconSize
width: 30
height: 30
onClicked: { leftMenu() }
}
@ -52,50 +51,60 @@ Rectangle { // Global Toolbar
Icon {
id: btnLeftBack
iconColor: Theme.toolbarIconColor
source: gcd.assetPath + "core/chevron_left-24px.webp"
source: gcd.assetPath + "core/chevron_left-24px.svg"
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
width: toolbar.iconSize
height: toolbar.iconSize
width: 30
height: 30
onClicked: { back() }
}
Opaque.Label {
id: paneTitle
width: rightPaneWidth - (btnRightMenu.visible ? btnRightMenu.width : 0) - 2 * Theme.paddingStandard
horizontalAlignment: Text.AlignHCenter
anchors.right: btnRightMenu.visible ? btnRightMenu.left : parent.right
anchors.rightMargin: Theme.paddingStandard
anchors.verticalCenter: parent.verticalCenter
header: true
multiline: false
text: "global toolbar"
}
TextMetrics {
id: paneTitleTextMetric
text: paneTitle.text
font: paneTitle.font
}
Rectangle {
id: paneArea
anchors.right: parent.right
EllipsisLabel {
id: paneTitle
visible: true
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.mainTextColor
size: Theme.tabSize * gcd.themeScale
weight: Font.Bold
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
text: "global toolbar"
//extraPadding: btnRightMenu.width + 10
}
onWidthChanged: { paneTitle.textResize() }
}
Icon {
id: btnRightMenu
iconColor: Theme.toolbarIconColor
source: gcd.assetPath + "core/more_vert-24px.webp"
source: gcd.assetPath + "core/more_vert-24px.svg"
visible: false
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
width: toolbar.iconSize
height: toolbar.iconSize
width: 30
height: 30
onClicked: { rightMenu() }
}
function setTitle(text) {
function setTitle(text, width) {
paneTitle.text = text
paneArea.width = theStack.width
paneTitle.textResize()
paneTitle.visible = true
}

View File

@ -13,14 +13,11 @@ TextField {
property bool error: false
color: error ? errorColor : Theme.mainTextColor
font.pixelSize: Theme.secondaryTextSize * gcd.themeScale
font.pixelSize: Theme.secondaryTextSize * gcd.themeScale * gcd.themeScale
signal clicked
smooth: true
placeholderTextColor: Theme.altTextColor
// NOTE: Android Password Fields don't work unless we set an explicit character.
passwordCharacter: "*"
background: Rectangle {
id: bg
anchors.fill: parent

View File

@ -7,21 +7,13 @@ Item {
property alias source: img.source
property int size: 24
property string tooltip: ""
property alias color: bgRect.color
width: size
height: size
signal clicked()
property alias imgSrc: img
ToolTip.visible: tooltip != "" && ma.containsMouse
ToolTip.text: tooltip
Rectangle {
id: bgRect
anchors.fill: parent
color: "transparent"
}
Image {
id: img
width: root.size * (ma.pressed ? 0.5 : 0.8)

File diff suppressed because one or more lines are too long

568
fonts/Twemoji.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -4,99 +4,98 @@
<context>
<name>EmojiDrawer</name>
<message>
<location filename="../EmojiDrawer.qml" line="69"/>
<location filename="../EmojiDrawer.qml" line="95"/>
<location filename="../EmojiDrawer.qml" line="64"/>
<source>search</source>
<extracomment>Search...</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="112"/>
<location filename="../EmojiDrawer.qml" line="76"/>
<source>emojicat-expressions</source>
<extracomment>Expressions</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="121"/>
<location filename="../EmojiDrawer.qml" line="84"/>
<source>emojicat-activities</source>
<extracomment>Activities</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="129"/>
<location filename="../EmojiDrawer.qml" line="92"/>
<source>emojicat-food</source>
<extracomment>Food, drink &amp; herbs</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="137"/>
<location filename="../EmojiDrawer.qml" line="100"/>
<source>emojicat-gender</source>
<extracomment>Gender, relationships &amp; sexuality</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="145"/>
<location filename="../EmojiDrawer.qml" line="108"/>
<source>emojicat-nature</source>
<extracomment>Nature and effects</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="153"/>
<location filename="../EmojiDrawer.qml" line="116"/>
<source>emojicat-objects</source>
<extracomment>Objects</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="161"/>
<location filename="../EmojiDrawer.qml" line="124"/>
<source>emojicat-people</source>
<extracomment>People and animals</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="169"/>
<location filename="../EmojiDrawer.qml" line="132"/>
<source>emojicat-symbols</source>
<extracomment>Symbols</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="177"/>
<location filename="../EmojiDrawer.qml" line="140"/>
<source>emojicat-travel</source>
<extracomment>Travel &amp; places</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="185"/>
<location filename="../EmojiDrawer.qml" line="148"/>
<source>emojicat-misc</source>
<extracomment>Miscellaneous</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="225"/>
<location filename="../EmojiDrawer.qml" line="190"/>
<source>cycle-cats-android</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="225"/>
<location filename="../EmojiDrawer.qml" line="190"/>
<source>cycle-cats-desktop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="260"/>
<location filename="../EmojiDrawer.qml" line="225"/>
<source>cycle-morphs-android</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="260"/>
<location filename="../EmojiDrawer.qml" line="225"/>
<source>cycle-morphs-desktop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="293"/>
<location filename="../EmojiDrawer.qml" line="258"/>
<source>cycle-colours-android</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="293"/>
<location filename="../EmojiDrawer.qml" line="258"/>
<source>cycle-colours-desktop</source>
<translation type="unfinished"></translation>
</message>

View File

@ -1,89 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en">
<TS version="2.1" language="en_US">
<context>
<name>EmojiDrawer</name>
<message>
<location filename="../EmojiDrawer.qml" line="190"/>
<source>cycle-cats-android</source>
<translation>Click to cycle category.
Long-press to reset.</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="190"/>
<source>cycle-cats-desktop</source>
<translation>Click to cycle category.
Right-click to reset.</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="225"/>
<source>cycle-morphs-android</source>
<translation>Click to cycle morphs.
Long-press to reset.</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="225"/>
<source>cycle-morphs-desktop</source>
<translation>Click to cycle morphs.
Right-click to reset.</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="258"/>
<source>cycle-colours-android</source>
<translation>Click to cycle colours.
Long-press to reset.</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="258"/>
<source>cycle-colours-desktop</source>
<translation>Click to cycle colours.
Right-click to reset.</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="64"/>
<source>search</source>
<extracomment>Search...</extracomment>
<translation>Search...</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="76"/>
<source>emojicat-expressions</source>
<extracomment>Expressions</extracomment>
<translation>Expressions</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="84"/>
<source>emojicat-activities</source>
<extracomment>Activities</extracomment>
<translation>Activities</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="92"/>
<source>emojicat-food</source>
<extracomment>Food, drink &amp; herbs</extracomment>
<translation>Food, drink &amp; herbs</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="100"/>
<source>emojicat-gender</source>
<extracomment>Gender, relationships &amp; sexuality</extracomment>
<translation>Gender, relationships &amp; sexuality</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="108"/>
<source>emojicat-nature</source>
<extracomment>Nature and effects</extracomment>
<translation>Nature and effects</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="116"/>
<source>emojicat-objects</source>
<extracomment>Objects</extracomment>
<translation>Objects</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="124"/>
<source>emojicat-people</source>
<extracomment>People and animals</extracomment>
<translation>People and animals</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="132"/>
<source>emojicat-symbols</source>
<extracomment>Symbols</extracomment>
<translation>Symbols</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="140"/>
<source>emojicat-travel</source>
<extracomment>Travel &amp; places</extracomment>
<translation>Travel &amp; places</translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="148"/>
<source>emojicat-misc</source>
<extracomment>Miscellaneous</extracomment>
<translation>Miscellaneous</translation>

Binary file not shown.

View File

@ -1,86 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="es">
<context>
<name>EmojiDrawer</name>
<message>
<source>cycle-cats-android</source>
<translation>Click para cambiar categoría. Mantenga pulsado para reiniciar.</translation>
</message>
<message>
<source>cycle-cats-desktop</source>
<translation>Click para cambiar categoría. Click derecho para reiniciar.</translation>
</message>
<message>
<source>cycle-morphs-android</source>
<translation>Click para cambiar transformaciones. Mantenga pulsado para reiniciar.</translation>
</message>
<message>
<source>cycle-morphs-desktop</source>
<translation>Click para cambiar transformaciones. Click derecho para reiniciar.</translation>
</message>
<message>
<source>cycle-colours-android</source>
<translation>Click para cambiar de colores. Mantenga pulsado para reiniciar.</translation>
</message>
<message>
<source>cycle-colours-desktop</source>
<translation>Click para cambiar colores. Click derecho para reiniciar.</translation>
</message>
<message>
<source>search</source>
<extracomment>Search...</extracomment>
<translation>Búsqueda...</translation>
</message>
<message>
<source>emojicat-expressions</source>
<extracomment>Expressions</extracomment>
<translation>Expresiones</translation>
</message>
<message>
<source>emojicat-activities</source>
<extracomment>Activities</extracomment>
<translation>Actividades</translation>
</message>
<message>
<source>emojicat-food</source>
<extracomment>Food, drink &amp; herbs</extracomment>
<translation>Alimentos, bebidas y hierbas</translation>
</message>
<message>
<source>emojicat-gender</source>
<extracomment>Gender, relationships &amp; sexuality</extracomment>
<translation>Género, relaciones y sexualidad</translation>
</message>
<message>
<source>emojicat-nature</source>
<extracomment>Nature and effects</extracomment>
<translation>Naturaleza y efectos</translation>
</message>
<message>
<source>emojicat-objects</source>
<extracomment>Objects</extracomment>
<translation>Objetos</translation>
</message>
<message>
<source>emojicat-people</source>
<extracomment>People and animals</extracomment>
<translation>Personas y animales</translation>
</message>
<message>
<source>emojicat-symbols</source>
<extracomment>Symbols</extracomment>
<translation>Símbolos</translation>
</message>
<message>
<source>emojicat-travel</source>
<extracomment>Travel &amp; places</extracomment>
<translation>Viajes y lugares</translation>
</message>
<message>
<source>emojicat-misc</source>
<extracomment>Miscellaneous</extracomment>
<translation>Miscelánea</translation>
</message>
</context>
</TS>

View File

@ -4,99 +4,98 @@
<context>
<name>EmojiDrawer</name>
<message>
<location filename="../EmojiDrawer.qml" line="69"/>
<location filename="../EmojiDrawer.qml" line="95"/>
<location filename="../EmojiDrawer.qml" line="64"/>
<source>search</source>
<extracomment>Search...</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="112"/>
<location filename="../EmojiDrawer.qml" line="76"/>
<source>emojicat-expressions</source>
<extracomment>Expressions</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="121"/>
<location filename="../EmojiDrawer.qml" line="84"/>
<source>emojicat-activities</source>
<extracomment>Activities</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="129"/>
<location filename="../EmojiDrawer.qml" line="92"/>
<source>emojicat-food</source>
<extracomment>Food, drink &amp; herbs</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="137"/>
<location filename="../EmojiDrawer.qml" line="100"/>
<source>emojicat-gender</source>
<extracomment>Gender, relationships &amp; sexuality</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="145"/>
<location filename="../EmojiDrawer.qml" line="108"/>
<source>emojicat-nature</source>
<extracomment>Nature and effects</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="153"/>
<location filename="../EmojiDrawer.qml" line="116"/>
<source>emojicat-objects</source>
<extracomment>Objects</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="161"/>
<location filename="../EmojiDrawer.qml" line="124"/>
<source>emojicat-people</source>
<extracomment>People and animals</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="169"/>
<location filename="../EmojiDrawer.qml" line="132"/>
<source>emojicat-symbols</source>
<extracomment>Symbols</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="177"/>
<location filename="../EmojiDrawer.qml" line="140"/>
<source>emojicat-travel</source>
<extracomment>Travel &amp; places</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="185"/>
<location filename="../EmojiDrawer.qml" line="148"/>
<source>emojicat-misc</source>
<extracomment>Miscellaneous</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="225"/>
<location filename="../EmojiDrawer.qml" line="190"/>
<source>cycle-cats-android</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="225"/>
<location filename="../EmojiDrawer.qml" line="190"/>
<source>cycle-cats-desktop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="260"/>
<location filename="../EmojiDrawer.qml" line="225"/>
<source>cycle-morphs-android</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="260"/>
<location filename="../EmojiDrawer.qml" line="225"/>
<source>cycle-morphs-desktop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="293"/>
<location filename="../EmojiDrawer.qml" line="258"/>
<source>cycle-colours-android</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="293"/>
<location filename="../EmojiDrawer.qml" line="258"/>
<source>cycle-colours-desktop</source>
<translation type="unfinished"></translation>
</message>

Binary file not shown.

View File

@ -1,92 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="it">
<context>
<name>EmojiDrawer</name>
<message>
<source>cycle-cats-android</source>
<translation>Fare clic per scorrere le categorie.
Pressione lunga per resettare.</translation>
</message>
<message>
<source>cycle-cats-desktop</source>
<translation>Fare clic per scorrere le categorie.
Cliccare con il tasto destro per resettare.</translation>
</message>
<message>
<source>cycle-morphs-android</source>
<translation>Fare clic per scorrere i morph.
Pressione lunga per resettare.</translation>
</message>
<message>
<source>cycle-morphs-desktop</source>
<translation>Fare clic per scorrere i morph.
Cliccare con il tasto destro per resettare.</translation>
</message>
<message>
<source>cycle-colours-android</source>
<translation>Fare clic per scorrere i colori.
Pressione lunga per resettare.</translation>
</message>
<message>
<source>cycle-colours-desktop</source>
<translation>Fare clic per scorrere i colori.
Cliccare con il tasto destro per resettare.</translation>
</message>
<message>
<source>search</source>
<extracomment>Search...</extracomment>
<translation>Ricerca...</translation>
</message>
<message>
<source>emojicat-expressions</source>
<extracomment>Expressions</extracomment>
<translation>Espressioni</translation>
</message>
<message>
<source>emojicat-activities</source>
<extracomment>Activities</extracomment>
<translation>Attività</translation>
</message>
<message>
<source>emojicat-food</source>
<extracomment>Food, drink &amp; herbs</extracomment>
<translation>Cibo, bevande ed erbe aromatiche</translation>
</message>
<message>
<source>emojicat-gender</source>
<extracomment>Gender, relationships &amp; sexuality</extracomment>
<translation>Genere, relazioni e sessualità</translation>
</message>
<message>
<source>emojicat-nature</source>
<extracomment>Nature and effects</extracomment>
<translation>Natura ed effetti</translation>
</message>
<message>
<source>emojicat-objects</source>
<extracomment>Objects</extracomment>
<translation>Oggetti</translation>
</message>
<message>
<source>emojicat-people</source>
<extracomment>People and animals</extracomment>
<translation>Persone e animali</translation>
</message>
<message>
<source>emojicat-symbols</source>
<extracomment>Symbols</extracomment>
<translation>Simboli</translation>
</message>
<message>
<source>emojicat-travel</source>
<extracomment>Travel &amp; places</extracomment>
<translation>Viaggi e luoghi</translation>
</message>
<message>
<source>emojicat-misc</source>
<extracomment>Miscellaneous</extracomment>
<translation>Miscellanea</translation>
</message>
</context>
</TS>

View File

@ -4,99 +4,98 @@
<context>
<name>EmojiDrawer</name>
<message>
<location filename="../EmojiDrawer.qml" line="69"/>
<location filename="../EmojiDrawer.qml" line="95"/>
<location filename="../EmojiDrawer.qml" line="64"/>
<source>search</source>
<extracomment>Search...</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="112"/>
<location filename="../EmojiDrawer.qml" line="76"/>
<source>emojicat-expressions</source>
<extracomment>Expressions</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="121"/>
<location filename="../EmojiDrawer.qml" line="84"/>
<source>emojicat-activities</source>
<extracomment>Activities</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="129"/>
<location filename="../EmojiDrawer.qml" line="92"/>
<source>emojicat-food</source>
<extracomment>Food, drink &amp; herbs</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="137"/>
<location filename="../EmojiDrawer.qml" line="100"/>
<source>emojicat-gender</source>
<extracomment>Gender, relationships &amp; sexuality</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="145"/>
<location filename="../EmojiDrawer.qml" line="108"/>
<source>emojicat-nature</source>
<extracomment>Nature and effects</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="153"/>
<location filename="../EmojiDrawer.qml" line="116"/>
<source>emojicat-objects</source>
<extracomment>Objects</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="161"/>
<location filename="../EmojiDrawer.qml" line="124"/>
<source>emojicat-people</source>
<extracomment>People and animals</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="169"/>
<location filename="../EmojiDrawer.qml" line="132"/>
<source>emojicat-symbols</source>
<extracomment>Symbols</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="177"/>
<location filename="../EmojiDrawer.qml" line="140"/>
<source>emojicat-travel</source>
<extracomment>Travel &amp; places</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="185"/>
<location filename="../EmojiDrawer.qml" line="148"/>
<source>emojicat-misc</source>
<extracomment>Miscellaneous</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="225"/>
<location filename="../EmojiDrawer.qml" line="190"/>
<source>cycle-cats-android</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="225"/>
<location filename="../EmojiDrawer.qml" line="190"/>
<source>cycle-cats-desktop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="260"/>
<location filename="../EmojiDrawer.qml" line="225"/>
<source>cycle-morphs-android</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="260"/>
<location filename="../EmojiDrawer.qml" line="225"/>
<source>cycle-morphs-desktop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="293"/>
<location filename="../EmojiDrawer.qml" line="258"/>
<source>cycle-colours-android</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../EmojiDrawer.qml" line="293"/>
<location filename="../EmojiDrawer.qml" line="258"/>
<source>cycle-colours-desktop</source>
<translation type="unfinished"></translation>
</message>

View File

@ -20,8 +20,6 @@ RESOURCES += qml.qrc
TRANSLATIONS = i18n/translation_en.ts \
i18n/translation_de.ts \
i18n/translation_es.ts \
i18n/translation_it.ts \
i18n/translation_pt.ts \
i18n/translation_fr.ts

68
qml.qrc
View File

@ -1,41 +1,35 @@
<RCC>
<qresource prefix="/">
<file>./HLine.qml</file>
<file>./styles/CwtchTextFieldStyle.qml</file>
<file>./styles/CwtchComboBoxStyle.qml</file>
<file>./styles/CwtchTextAreaStyle.qml</file>
<file>./styles/CwtchExpandingButton.qml</file>
<file>./styles/CwtchProgress.qml</file>
<file>./ButtonTextField.qml</file>
<file>./IconTextField.qml</file>
<file>./EllipsisLabel.qml</file>
<file>./Badge.qml</file>
<file>./controls/Loader.qml</file>
<file>./controls/ImageButton.qml</file>
<file>./controls/FlagButton.qml</file>
<file>./controls/Variables.qml</file>
<file>./FontAwesome.qml</file>
<file>./Icon.qml</file>
<file>./TextField.qml</file>
<file>./PortraitRow.qml</file>
<file>./Label.qml</file>
<file>./UnderlineTextField.qml</file>
<file>./EmojiDrawer.qml</file>
<file>./ToggleSwitch.qml</file>
<file>./Button.qml</file>
<file>./theme/ThemeType.qml</file>
<file>./theme/Theme.qml</file>
<file>./theme/CwtchDark.qml</file>
<file>./theme/CwtchLight.qml</file>
<file>./Portrait.qml</file>
<file>./Toolbar.qml</file>
<file>./fonts/Fonts.qml</file>
<file>./RadioButton.qml</file>
<file>i18n/translation_de.qm</file>
<file>i18n/translation_en.qm</file>
<file>i18n/translation_fr.qm</file>
<file>i18n/translation_es.qm</file>
<file>i18n/translation_it.qm</file>
<file>i18n/translation_pt.qm</file>
<file>./HLine.qml</file>
<file>./styles/CwtchTextFieldStyle.qml</file>
<file>./styles/CwtchComboBoxStyle.qml</file>
<file>./styles/CwtchTextAreaStyle.qml</file>
<file>./styles/CwtchExpandingButton.qml</file>
<file>./styles/CwtchProgress.qml</file>
<file>./ButtonTextField.qml</file>
<file>./IconTextField.qml</file>
<file>./EllipsisLabel.qml</file>
<file>./Badge.qml</file>
<file>./controls/Loader.qml</file>
<file>./controls/ImageButton.qml</file>
<file>./controls/FlagButton.qml</file>
<file>./controls/Variables.qml</file>
<file>./FontAwesome.qml</file>
<file>./Icon.qml</file>
<file>./TextField.qml</file>
<file>./PortraitRow.qml</file>
<file>./ScalingLabel.qml</file>
<file>./UnderlineTextField.qml</file>
<file>./EmojiDrawer.qml</file>
<file>./ToggleSwitch.qml</file>
<file>./Button.qml</file>
<file>./theme/ThemeType.qml</file>
<file>./theme/Theme.qml</file>
<file>./theme/CwtchDark.qml</file>
<file>./theme/CwtchLight.qml</file>
<file>./Portrait.qml</file>
<file>./Toolbar.qml</file>
<file>./fonts/Fonts.qml</file>
<file>./RadioButton.qml</file>
</qresource>
</RCC>

View File

@ -10,7 +10,6 @@ ThemeType {
readonly property color hotPink: "#D01972"
readonly property color lightGrey: "#9E9E9E"
readonly property color softGreen: "#A0FFB0"
readonly property color softRed: "#FFA0B0"
backgroundMainColor: darkGreyPurple
backgroundPaneColor: darkGreyPurple
@ -38,15 +37,12 @@ ThemeType {
textfieldButtonColor: purple
textfieldButtonTextColor: darkGreyPurple
scrollbarDefaultColor: purple
scrollbarActiveColor: hotPink
portraitOnlineBorderColor: whitePurple
portraitOnlineBackgroundColor: whitePurple
portraitOnlineTextColor: whitePurple
portraitConnectingBorderColor: purple //mauvePurple
portraitConnectingBackgroundColor: purple //darkGreyPurple
portraitConnectingTextColor: purple
portraitConnectingTextColor: whitePurple
portraitOfflineBorderColor: purple
portraitOfflineBackgroundColor: purple
portraitOfflineTextColor: purple
@ -55,15 +51,11 @@ ThemeType {
portraitBlockedTextColor: lightGrey
portraitOnlineBadgeColor: softGreen
portraitOfflineBadgeColor: softRed
portraitContactBadgeColor: hotPink
portraitContactBadgeTextColor: whitePurple
portraitProfileBadgeColor: mauvePurple
portraitProfileBadgeTextColor: darkGreyPurple
portraitOverlayOfflineColor: mauvePurple
dropShadowColor: mauvePurple
dropShadowPaneColor: darkGreyPurple
@ -88,8 +80,6 @@ ThemeType {
statusbarOnlineColor: mauvePurple
statusbarOnlineFontColor: whitePurple
chatOverlayWarningTextColor: purple
messageFromMeBackgroundColor: mauvePurple
messageFromMeTextColor: whitePurple
messageFromOtherBackgroundColor: deepPurple

View File

@ -10,7 +10,6 @@ ThemeType {
readonly property color hotPink: "#D01972"
readonly property color lightGrey: "#B3B6B3"
readonly property color softGreen: "#A0FFB0"
readonly property color softRed: "#FFA0B0"
backgroundMainColor: whitePurple
backgroundPaneColor: softPurple
@ -39,9 +38,6 @@ ThemeType {
textfieldButtonColor: hotPink
textfieldButtonTextColor: whitePurple
scrollbarDefaultColor: darkPurple
scrollbarActiveColor: hotPink
portraitOnlineBorderColor: darkPurple
portraitOnlineBackgroundColor: darkPurple
portraitOnlineTextColor: darkPurple
@ -56,15 +52,11 @@ ThemeType {
portraitBlockedTextColor: lightGrey
portraitOnlineBadgeColor: softGreen
portraitOfflineBadgeColor: softRed
portraitContactBadgeColor: hotPink
portraitContactBadgeTextColor: whitePurple
portraitProfileBadgeColor: brightPurple
portraitProfileBadgeTextColor: whitePurple
portraitOverlayOfflineColor: whitePurple
dropShadowColor: purple
dropShadowPaneColor: purple
@ -89,8 +81,6 @@ ThemeType {
statusbarOnlineColor: darkPurple
statusbarOnlineFontColor: whitePurple
chatOverlayWarningTextColor: purple
messageFromMeBackgroundColor: darkPurple
messageFromMeTextColor: whitePurple
messageFromOtherBackgroundColor: purple

View File

@ -48,15 +48,12 @@ Item {
readonly property color portraitBlockedTextColor: theme.portraitBlockedTextColor
readonly property color portraitOnlineBadgeColor: theme.portraitOnlineBadgeColor
readonly property color portraitOfflineBadgeColor: theme.portraitOfflineBadgeColor
readonly property color portraitContactBadgeColor: theme.portraitContactBadgeColor
readonly property color portraitContactBadgeTextColor: theme.portraitContactBadgeTextColor
readonly property color portraitProfileBadgeColor: theme.portraitProfileBadgeColor
readonly property color portraitProfileBadgeTextColor: theme.portraitProfileBadgeTextColor
readonly property color portraitOverlayOfflineColor: theme.portraitOverlayOfflineColor
readonly property color toggleColor: theme.toggleColor
readonly property color toggleOffColor: theme.toggleOffColor
readonly property color toggleOnColor: theme.toggleOnColor
@ -79,7 +76,6 @@ Item {
readonly property color statusbarOnlineColor: theme.statusbarOnlineColor
readonly property color statusbarOnlineFontColor: theme.statusbarOnlineFontColor
readonly property color chatOverlayWarningTextColor: theme.chatOverlayWarningTextColor
readonly property color messageFromMeBackgroundColor: theme.messageFromMeBackgroundColor
readonly property color messageFromMeTextColor: theme.messageFromMeTextColor
readonly property color messageFromOtherBackgroundColor: theme.messageFromOtherBackgroundColor
@ -91,98 +87,21 @@ Item {
readonly property color messageStatusAlertColor: theme.messageStatusAlertColor
readonly property color messageStatusAlertTextColor: theme.messageStatusAlertTextColor
readonly property color scrollbarDefaultColor: theme.scrollbarDefaultColor
readonly property color scrollbarActiveColor: theme.scrollbarActiveColor
readonly property int headerSize: 50
readonly property int usernameSize: 30
readonly property int primaryTextSize: 25
readonly property int tabSize: 25
readonly property int chatSize: 20
readonly property int secondaryTextSize: 20 // address
readonly property int chatMetaTextSize: 15
readonly property int badgeTextSize: 12
readonly property int statusTextSize: 12
readonly property int contactPortraitSize: 75
readonly property variant sidePaneMinSizeBase: [200, 400, 600]
readonly property int sidePaneMinSize: sidePaneMinSizeBase[p[scale]]+200/*for debugging*/
readonly property variant chatPaneMinSizeBase: [300, 400, 500]
readonly property int chatPaneMinSize: chatPaneMinSizeBase[p[scale]]
readonly property int doublePaneMinSize: sidePaneMinSize + chatPaneMinSize
readonly property int sidePaneMinSize: 700
readonly property int doublePaneMinSize: 1000
property ThemeType dark: CwtchDark{}
property ThemeType light: CwtchLight{}
property ThemeType theme: gcd.theme == "dark" ? dark : light
// 0-4. replace gcd.themeScale with whatever your app has!
property int scale: gcd.themeScaleNew
// magnification system: all size-sets should generally respect these semantics:
//
// scale
// 0 1 2 3 4
// padding S M M M L
// text S S M L L
//
// use the syntax "propertyName: propertyNameBase[p[scale]]" for padding that
// has S/M/L granularity (and likewise t[scale] for text)
// use the syntax "propertyName: propertyNameBase[scale]" for things that you
// would prefer have 0/1/2/3/4 granularity.
readonly property variant p: [0, 1, 1, 1, 2]
readonly property variant t: [0, 0, 1, 2, 2]
//////////////////////
// section: PADDING //
//////////////////////
readonly property variant paddingMinimalBase: [1, 4, 6]
readonly property int paddingMinimal: paddingMinimalBase[p[scale]]
readonly property variant paddingSmallBase: [3, 10, 15]
readonly property int paddingSmall: paddingSmallBase[p[scale]]
readonly property variant paddingStandardBase: [8, 20, 30]
readonly property int paddingStandard: paddingStandardBase[p[scale]]
readonly property variant paddingLargeBase: [10, 30, 40]
readonly property int paddingLarge: paddingLargeBase[p[scale]]
readonly property variant paddingClickTargetBase: gcd.os == "android" ? [10, 40, 100] : [3, 10, 15]
readonly property int paddingClickTarget: paddingClickTargetBase[p[scale]]
////////////////////////
// section: TEXT SIZE //
////////////////////////
readonly property variant textSmallPtBase: [8, 12, 16]
readonly property int textSmallPt: textSmallPtBase[t[scale]]
readonly property variant textMediumPtBase: [10, 16, 24]
readonly property int textMediumPt: textMediumPtBase[t[scale]]
readonly property variant textLargePtBase: [16, 24, 32]
readonly property int textLargePt: textLargePtBase[t[scale]]
readonly property variant textSubHeaderPtBase: [12, 18, 26]
readonly property int textSubHeaderPt: textHeaderPtBase[t[scale]]
readonly property variant textHeaderPtBase: [16, 24, 32]
readonly property int textHeaderPt: textHeaderPtBase[t[scale]]
/////////////////////////////////
// section: ELEMENT DIMENSIONS //
/////////////////////////////////
readonly property variant uiIconSizeSBase: [8, 16, 24]
readonly property int uiIconSizeS: uiIconSizeSBase[p[scale]]
readonly property variant uiIconSizeMBase: [24, 32, 48]
readonly property int uiIconSizeM: uiIconSizeMBase[p[scale]]
readonly property variant uiIconSizeLBase: [32, 48, 60]
readonly property int uiIconSizeL: uiIconSizeLBase[p[scale]]
readonly property variant uiEmojiSizeBase: [24, 32, 48]
readonly property int uiEmojiSize: uiEmojiSizeBase[p[scale]]
readonly property variant contactPortraitSizeBase: [60, 72, 84]
readonly property int contactPortraitSize: contactPortraitSizeBase[p[scale]]
///////////////////////////////////////
// section: OLD FONT SIZES REFERENCE //
///////////////////////////////////////
// old size (usually given to font.pixelSize but occasionally to font.pointSize) -> new size
readonly property int badgeTextSize: 12
readonly property int statusTextSize: 12
// readonly property int chatMetaTextSize: 15 -> textSmallPt
// readonly property int secondaryTextSize: 20 -> textSmallPt
readonly property int chatSize: textMediumPt //was:20
// readonly property int primaryTextSize: 25 -> textMediumPt
readonly property int tabSize: textMediumPt //was:25
// readonly property int subHeaderSize: 35 -> textSubHeaderPt
// readonly property int headerSize: 50 -> textHeaderPt
}

View File

@ -28,9 +28,6 @@ QtObject {
property color textfieldButtonColor: "red"
property color textfieldButtonTextColor: "red"
property color scrollbarDefaultColor: "red"
property color scrollbarActiveColor: "red"
property color portraitOnlineBorderColor: "red"
property color portraitOnlineBackgroundColor: "red"
property color portraitOnlineTextColor: "red"
@ -45,16 +42,11 @@ QtObject {
property color portraitBlockedTextColor: "red"
property color portraitOnlineBadgeColor: "red"
property color portraitOfflineBadgeColor: "red"
property color portraitContactBadgeColor: "red"
property color portraitContactBadgeTextColor: "red"
property color portraitProfileBadgeColor: "red"
property color portraitProfileBadgeTextColor: "red"
property color portraitOverlayOfflineColor: "red"
property color dropShadowColor: "black"
property color dropShadowPaneColor: "black"
property color toggleColor: "black"
@ -79,7 +71,6 @@ QtObject {
property color statusbarOnlineColor: "red"
property color statusbarOnlineFontColor: "red"
property color chatOverlayWarningTextColor: "red"
property color messageFromMeBackgroundColor: "red"
property color messageFromMeTextColor: "red"
property color messageFromOtherBackgroundColor: "red"