Commit fcd971f9 authored by Camilo Higuita's avatar Camilo Higuita

getting vvave ready for plasma mobile

parent 3dd44637
......@@ -677,6 +677,11 @@ bool Babe::isMobile()
return BAE::isMobile();
}
bool Babe::isAndroid()
{
return BAE::isAndroid();
}
int Babe::screenGeometry(QString side)
{
side = side.toLower();
......
......@@ -94,6 +94,7 @@ class Babe : public CollectionDB
/*UTILS*/
Q_INVOKABLE static bool isMobile();
Q_INVOKABLE static bool isAndroid();
Q_INVOKABLE static int screenGeometry(QString side);
Q_INVOKABLE static int cursorPos(QString axis);
......
This diff is collapsed.
......@@ -154,8 +154,8 @@ ColumnLayout
{
id: searchBox
Layout.fillWidth: true
width: parent.width
height: toolBarHeight
// width: parent.width
// height: toolBarHeight
position: ToolBar.Footer
Rectangle
......@@ -173,14 +173,14 @@ ColumnLayout
TextInput
{
id: searchInput
color: foregroundColor
color: textColor
Layout.fillWidth: true
Layout.fillHeight: true
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
selectByMouse: !root.isMobile
selectionColor: babeHighlightColor
selectedTextColor: foregroundColor
selectionColor: highlightColor
selectedTextColor: highlightedTextColor
focus: true
text: ""
wrapMode: TextEdit.Wrap
......
......@@ -283,8 +283,8 @@ Page
{
id: searchBox
Layout.fillWidth: true
width: parent.width
height: toolBarHeight
// width: parent.width
// height: toolBarHeight
position: ToolBar.Footer
Rectangle
......@@ -303,14 +303,14 @@ Page
TextInput
{
id: searchInput
color: foregroundColor
color: textColor
Layout.fillWidth: true
Layout.fillHeight: true
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
selectByMouse: !root.isMobile
selectionColor: babeHighlightColor
selectedTextColor: foregroundColor
selectByMouse: !isMobile
selectionColor: highlightColor
selectedTextColor: highlightedTextColor
focus: true
text: ""
wrapMode: TextEdit.Wrap
......
......@@ -51,7 +51,7 @@ Page
Layout.leftMargin: contentMargins
width: rowHeight
iconName : "arrow-left"
iconColor: darkForegroundColor
iconColor: darktextColor
onClicked: stackView.pop(youtubeList)
}
......@@ -64,7 +64,7 @@ Page
elide : Text.ElideRight
font.bold : false
color : darkForegroundColor
color : darktextColor
font.pointSize: fontSizes.big
horizontalAlignment : Text.AlignHCenter
verticalAlignment : Text.AlignVCenter
......@@ -75,7 +75,7 @@ Page
Layout.alignment : Qt.AlignLeft
width: rowHeight
iconName : "link"
iconColor: darkForegroundColor
iconColor: darktextColor
onClicked: webView.url = currentYt.url.replace("embed/", "watch?v=")
}
......@@ -84,7 +84,7 @@ Page
Layout.alignment : Qt.AlignLeft
width: rowHeight
iconName : "download"
iconColor: darkForegroundColor
iconColor: darktextColor
onClicked: bae.getYoutubeTrack(JSON.stringify(currentYt))
}
......@@ -95,7 +95,7 @@ Page
Layout.rightMargin: contentMargins
width: rowHeight
iconName : "overflow-menu"
iconColor: darkForegroundColor
iconColor: darktextColor
}
}
}
......
......@@ -50,6 +50,25 @@ inline bool isMobile()
#endif
}
inline bool isAndroid()
{
#if defined(Q_OS_ANDROID)
return true;
#elif defined(Q_OS_LINUX)
return false;
#elif defined(Q_OS_WIN32)
return false;
#elif defined(Q_OS_WIN64)
return false;
#elif defined(Q_OS_MACOS)
return false;
#elif defined(Q_OS_IOS)
return false;
#elif defined(Q_OS_HAIKU)
return false;
#endif
}
enum SEG
{
......
......@@ -9,15 +9,15 @@ ToolButton
property string iconName
property int iconSize : toolBarIconSize
property color iconColor: foregroundColor
readonly property string defaultColor : foregroundColor
property color iconColor: textColor
readonly property string defaultColor : textColor
property bool anim : false
// icon.name: isMobile ? "" : babeButton.iconName
// icon.width: isMobile ? 0 : babeButton.iconSize
// icon.height: isMobile ? 0 : babeButton.iconSize
// icon.color: isMobile ? "transparent" : (iconColor || defaultColor)
// icon.name: isAndroid ? "" : babeButton.iconName
// icon.width: isAndroid ? 0 : babeButton.iconSize
// icon.height: isAndroid ? 0 : babeButton.iconSize
// icon.color: isAndroid ? "transparent" : (iconColor || defaultColor)
onClicked: if(anim) animIcon.running = true
......@@ -29,8 +29,8 @@ ToolButton
anchors.centerIn: parent
width: iconSize
height: iconSize
visible: !isMobile
source: isMobile ? "" : iconName
visible: !isAndroid
source: isAndroid ? "" : iconName
isMask: false
color: iconColor || defaultColor
......@@ -39,7 +39,7 @@ ToolButton
BabeIcon
{
id: babeIcon
visible: isMobile
visible: isAndroid
icon: babeButton.iconName
iconColor: babeButton.iconColor || babeButton.defaultColor
iconSize: babeButton.iconSize
......
......@@ -15,7 +15,7 @@ ItemDelegate
property bool boldLabel : false
property alias label: labelTxt.text
property alias fontFamily: labelTxt.font.family
property string textColor: ListView.isCurrentItem ? highlightTextColor : foregroundColor
property string labelColor: ListView.isCurrentItem ? highlightedTextColor : textColor
Rectangle
......@@ -43,7 +43,7 @@ ItemDelegate
text: labelTxt.text
elide: Text.ElideRight
color: textColor
color: labelColor
font.pointSize: fontSizes.medium
font.bold: boldLabel
......
......@@ -20,6 +20,6 @@ Dialog
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
......@@ -23,7 +23,7 @@ BabeDialog
text: message ? message : ""
width: babeMessageRoot.width
elide: Text.ElideRight
color: foregroundColor
color: textColor
}
TextArea
......@@ -35,7 +35,7 @@ BabeDialog
width: parent.width
wrapMode: TextEdit.WrapAnywhere
readOnly: true
color: foregroundColor
color: textColor
}
}
}
......@@ -15,8 +15,8 @@ ColumnLayout
property int borderRadius : 2
property int albumRadius : 0
property bool albumCard : true
property string fillColor: midLightColor
property string textColor: foregroundColor
property string fillColor: backgroundColor
property string labelColor: textColor
property bool hide : false
// height: typeof album === 'undefined' ? parseInt(albumSize+(albumSize*0.3)) : parseInt(albumSize+(albumSize*0.4))
......@@ -110,7 +110,7 @@ ColumnLayout
elide: Text.ElideRight
font.pointSize: fontSizes.medium
font.bold: true
color: textColor
color: labelColor
}
Label
......@@ -121,7 +121,7 @@ ColumnLayout
horizontalAlignment: Qt.AlignHCenter
elide: Text.ElideRight
font.pointSize: fontSizes.small
color: textColor
color: labelColor
}
}
......
......@@ -8,7 +8,7 @@ Item
property string emoji
property string message
clip: true
property color color : foregroundColor
property color color : textColor
focus: true
anchors.fill: parent
......
......@@ -25,7 +25,7 @@ Page
property string headerBarExitIcon : "window-close"
property color headerBarColor : backgroundColor
property color textColor : foregroundColor
property color labelColor : textColor
property bool wasPulled : false
......@@ -45,7 +45,7 @@ Page
id: holder
anchors.fill: parent
visible: babeList.count === 0
color : textColor
color : labelColor
focus: true
}
......@@ -71,7 +71,7 @@ Page
BabeButton
{
Layout.alignment : Qt.AlignLeft
Layout.leftMargin: contentMargins
// Layout.leftMargin: contentMargins
width: rowHeight
visible: headerBarExit
anim : true
......@@ -83,7 +83,7 @@ Page
{
id: headerBarActionsLeft
Layout.alignment : Qt.AlignLeft
Layout.leftMargin: headerBarExit ? 0 : contentMargins
// Layout.leftMargin: headerBarExit ? 0 : contentMargins
}
Label
......@@ -95,7 +95,7 @@ Page
elide : Text.ElideRight
font.bold : false
color : textColor
color : labelColor
font.pointSize: fontSizes.big
horizontalAlignment : Text.AlignHCenter
verticalAlignment : Text.AlignVCenter
......@@ -105,7 +105,7 @@ Page
{
id: headerBarActionsRight
Layout.alignment : Qt.AlignRight
Layout.rightMargin: contentMargins
// Layout.rightMargin: contentMargins
}
}
......@@ -122,7 +122,7 @@ Page
{
width: babeList.width
height: babeList.currentItem.height
color: babeHighlightColor
color: highlightColor
}
focus: true
......
......@@ -23,5 +23,5 @@ Menu
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
......@@ -8,7 +8,7 @@ Popup
property string message : ""
id: notify
width: columnWidth
height: toolBarHeight
height: rowHeight
padding: 0
......@@ -38,7 +38,7 @@ Popup
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
Column
{
......@@ -52,7 +52,7 @@ Popup
font.pointSize: fontSizes.medium
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
color: foregroundColor
color: textColor
}
}
......
......@@ -47,6 +47,6 @@ Popup
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
......@@ -12,7 +12,7 @@ BabeList
holder.message: "<h2>This list is empty</h2><p>You can sdd new music sources from the settings</p>"
// cacheBuffer : 300
headerBarColor: backgroundColor
textColor: foregroundColor
labelColor: textColor
property bool trackNumberVisible
property bool quickPlayVisible : true
......@@ -101,7 +101,7 @@ BabeList
trackDurationVisible : trackDuration
trackRatingVisible : trackRating
menuItem: menuItemVisible
color: babeTableRoot.textColor
color: babeTableRoot.labelColor
bgColor: headerBarColor
remoteArtwork: isArtworkRemote
Connections
......
......@@ -60,7 +60,7 @@ BabeDialog
{
Layout.fillWidth: true
id: newPlaylistField
color: foregroundColor
color: textColor
placeholderText: qsTr("New playlist")
onAccepted:
{
......
......@@ -11,7 +11,7 @@ ItemDelegate
id: delegateRoot
width: parent.width
height: sameAlbum ? rowHeightAlt : rowHeight
height: sameAlbum ? rowHeight : rowHeight
clip: true
autoExclusive: true
......@@ -36,7 +36,7 @@ ItemDelegate
property color bgColor : backgroundColor
property color color : foregroundColor
property color highlightColor : highlightTextColor
property color highlightColor : highlightedTextColor
property string textColor: ListView.isCurrentItem ? highlightColor : color
property bool number : false
property bool quickPlay : true
......@@ -155,7 +155,7 @@ ItemDelegate
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft
Layout.margins: contentMargins
Layout.margins: space.tiny
Layout.leftMargin: coverArt ? contentMargins : 0
anchors.verticalCenter: parent.verticalCenter
......@@ -182,7 +182,7 @@ ItemDelegate
font.bold: true
elide: Text.ElideRight
font.pointSize: fontSizes.medium
font.pointSize: fontSizes.default
color: textColor
}
......@@ -198,7 +198,7 @@ ItemDelegate
text: title
font.bold: !sameAlbum
elide: Text.ElideRight
font.pointSize: fontSizes.medium
font.pointSize: fontSizes.default
color: textColor
}
......@@ -216,7 +216,7 @@ ItemDelegate
text: artist + " | " + album
font.bold: false
elide: Text.ElideRight
font.pointSize: fontSizes.small
font.pointSize: fontSizes.medium
color: textColor
}
......
......@@ -14,7 +14,7 @@ BabeMenu
property int rate : 0
property bool babe : false
property string starColor : "#FFC107"
property string starReg : foregroundColor
property string starReg : textColor
property string starIcon: "draw-star"
signal trackRemoved(string url)
......@@ -127,7 +127,7 @@ BabeMenu
horizontalAlignment: Qt.AlignHCenter
elide: Text.ElideRight
text: list.currentIndex >= 0 ? list.model.get(list.currentIndex).title : ""
color: foregroundColor
color: textColor
}
BabeMenuItem
......
......@@ -58,7 +58,7 @@ BabePopup
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
......
......@@ -12,8 +12,7 @@ ToolBar
property alias babeBar : babeBar
property string accentColor : babeColor
property string textColor : foregroundColor
property string bgColor : babeAltColor
property string textColor : textColor
property int currentIndex : 0
property bool accent : pageStack.wideMode || (!pageStack.wideMode && pageStack.currentIndex === 1)
......
......@@ -36,7 +36,7 @@ Page
BabeHolder
{
id: lyricsHolder
color: darkForegroundColor
color: darktextColor
anchors.fill: parent
visible: lyricsText.text.length > 0 ? false : true
message: "Couldn't find the lyrics!"
......@@ -59,7 +59,7 @@ Page
readOnly: true
padding: 20
text: ""
color: darkForegroundColor
color: darktextColor
font.pointSize: fontSizes.big
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
......@@ -148,7 +148,7 @@ Page
padding: 20
text: wikiAlbum
visible: wikiAlbum === "NONE" || wikiAlbum.length===0 ? false : true
color: darkForegroundColor
color: darktextColor
font.pointSize: fontSizes.big
horizontalAlignment: Qt.AlignHCenter
textFormat: Text.RichText
......@@ -175,7 +175,7 @@ Page
text: wikiArtist
visible: wikiArtist === "NONE" || wikiArtist.length===0 ? false : true
color: darkForegroundColor
color: darktextColor
font.pointSize: fontSizes.big
horizontalAlignment: Qt.AlignHCenter
textFormat: Text.StyledText
......
......@@ -113,17 +113,19 @@ Item
}
}
Item
ToolBar
{
id: mainlistContext
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
Layout.row: 2
Layout.column: 1
Layout.fillWidth: true
Layout.preferredHeight: visible ? toolBarHeight : 0
height: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing*2
// anchors.top: cover.bottom
leftPadding: 0
rightPadding: 0
Rectangle
{
......@@ -171,7 +173,7 @@ Item
{
id: infoBtn
anchors.centerIn: parent
iconColor: darkForegroundColor
iconColor: darktextColor
iconName: stackView.currentItem === table ? "documentinfo" : "arrow-left"
onClicked:
{
......@@ -194,7 +196,7 @@ Item
BabeButton
{
anchors.centerIn: parent
iconColor: darkForegroundColor
iconColor: darktextColor
iconName: "videoclip-amarok"
onClicked:
{
......@@ -215,8 +217,8 @@ Item
anchors.centerIn: parent
Layout.fillWidth: true
iconName: "overflow-menu"
onClicked: root.isMobile ? playlistMenu.open() : playlistMenu.popup()
iconColor: darkForegroundColor
onClicked: isMobile ? playlistMenu.open() : playlistMenu.popup()
iconColor: darktextColor
}
}
......@@ -293,7 +295,7 @@ Item
holder.message : "<h2>Meh!</h2><p>Start putting together your playlist!</p>"
holder.emoji: "qrc:/assets/face-sleeping.png"
textColor: darkForegroundColor
labelColor: darktextColor
Rectangle
{
......
......@@ -21,7 +21,7 @@ Page
width: parent.width
height: parent.height
z: 999
color: darkColor
color: altColor
opacity: 0.5
}
......
......@@ -59,7 +59,7 @@ BabePopup
// {
// anchors.fill: beatsImg
// source: beatsImg
// color: foregroundColor
// color: textColor
// }
// }
......@@ -75,12 +75,12 @@ BabePopup
Layout.alignment: Qt.AlignCenter
placeholderText: "email *"
color: foregroundColor
color: textColor
horizontalAlignment: Text.AlignHCenter
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
TextField
......@@ -92,12 +92,12 @@ BabePopup
Layout.alignment: Qt.AlignCenter
placeholderText: email.visible ? "nick *" : "nick or email"
color: foregroundColor
color: textColor
horizontalAlignment: Text.AlignHCenter
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
TextField
......@@ -112,12 +112,12 @@ BabePopup
Layout.alignment: Qt.AlignCenter
placeholderText: "password *"
color: foregroundColor
color: textColor
horizontalAlignment: Text.AlignHCenter
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
RowLayout
......@@ -134,12 +134,12 @@ BabePopup
Layout.fillWidth: true
Layout.rightMargin: contentMargins/2
placeholderText: "name"
color: foregroundColor
color: textColor
horizontalAlignment: Text.AlignHCenter
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
TextField
......@@ -149,12 +149,12 @@ BabePopup
Layout.leftMargin: contentMargins/2
placeholderText: "lastname"
color: foregroundColor
color: textColor
horizontalAlignment: Text.AlignHCenter
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
}
......@@ -176,7 +176,7 @@ BabePopup
Material.accent: babeColor
Material.background: backgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
Material.foreground: textColor
}
Button
......@@ -195,7 +195,7 @@ BabePopup
Material.accent: babeColor
Material.background: babeColor
Material.primary: babeColor
Material.foreground: darkForegroundColor
Material.foreground: darktextColor
onClicked: fullForm(true)
}
......
......@@ -21,7 +21,7 @@ BabeDialog
Layout.fillWidth: true
Layout.margins: contentMargins
width: parent.width
color: foregroundColor
color: textColor
onAccepted:
{
addPlaylist()
......
......@@ -12,7 +12,7 @@ ItemDelegate
height: rowHeightAlt
clip: true
property string textColor: ListView.isCurrentItem ? highlightTextColor : foregroundColor
property string labelColor: ListView.isCurrentItem ? highlightedTextColor : textColor
Rectangle
{
......@@ -46,7 +46,7 @@ ItemDelegate
id: playBtn
anchors.centerIn: parent
iconName: playlistIcon ? playlistIcon : ""
iconColor: textColor
iconColor: labelColor
}
}
......@@ -70,7 +70,7 @@ ItemDelegate
elide: Text.ElideRight
font.pointSize: fontSizes.medium
color: textColor
color: labelColor
}
}
......
......@@ -114,8 +114,8 @@ Page
{
id: searchBox
Layout.fillWidth: true