Commit 705c6fbc authored by Camilo Higuita's avatar Camilo Higuita

resize screen on desktop when clicking views in playlist-mode

parent a3a4d7b6
......@@ -11,6 +11,8 @@ unix:linux:!android:
include(kde/kde.pri)
}
TARGET = babe
TEMPLATE = app
CONFIG += c++11
......
babe.png

1.6 KB

......@@ -17,14 +17,14 @@ Kirigami.ApplicationWindow
{
id: root
visible: true
width: !isMobile ? bae.screenGeometry("width")*0.45 : 400
width: !isMobile ? wideSize : 400
minimumWidth: !isMobile ? columnWidth : 0
minimumHeight: !isMobile ? columnWidth : 0
minimumHeight: !isMobile ? columnWidth+64 : 0
height: 500
title: qsTr("Babe")
wideScreen: root.width > coverSize
Material.theme: isMobile ? Material.Dark : Material.Light
Material.theme: Material.Light
Material.accent: bae.babeColor()
Material.background: bae.backgroundColor()
Material.primary: bae.backgroundColor()
......@@ -35,7 +35,7 @@ Kirigami.ApplicationWindow
readonly property bool isMobile: bae.isMobile()
readonly property int maxW : root.maximumWidth
readonly property int maxH : root.maximumHeight
readonly property int wideSize : bae.screenGeometry("width")*0.45
property int columnWidth: Kirigami.Units.gridUnit * 20
property int coverSize: columnWidth*0.65
// property int columnWidth: Math.sqrt(root.width*root.height)*0.4
......@@ -138,29 +138,43 @@ Kirigami.ApplicationWindow
onPlaylistViewClicked:
{
if(pageStack.wideMode && !isMobile)
if(!isMobile && pageStack.wideMode)
root.width = columnWidth
else root.width = wideSize
pageStack.currentIndex = 0
}
onTracksViewClicked:
{
if(!isMobile && !pageStack.wideMode)
root.width = wideSize
pageStack.currentIndex = 1
currentView = 0
}
onAlbumsViewClicked:
{
if(!isMobile && !pageStack.wideMode)
root.width = wideSize
pageStack.currentIndex = 1
currentView = 1
}
onArtistsViewClicked:
{
if(!isMobile && !pageStack.wideMode)
root.width = wideSize
pageStack.currentIndex = 1
currentView = 2
}
onPlaylistsViewClicked:
{
if(!isMobile && !pageStack.wideMode)
root.width = wideSize
pageStack.currentIndex = 1
currentView = 3
}
......
[Desktop Entry]
Name=Babe
Comment=Play your music collection
TryExec=babe
Exec=babe %U
Terminal=false
Type=Application
Categories=Qt;Audio;Music;Player;AudioVideo;
StartupNotify=true
Icon=babe
MimeType=application/ogg;application/x-ogg;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/aac;audio/x-aac;audio/m4a;audio/x-m4a;audio/mp1;audio/x-mp1;audio/mp2;audio/x-mp2;audio/mp3;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/mpegurl;audio/x-mpegurl;audio/mpg;audio/x-mpg;audio/rn-mpeg;audio/ogg;audio/scpls;audio/x-scpls;audio/vnd.rn-realaudio;audio/wav;audio/x-pn-windows-pcm;audio/x-realaudio;audio/x-pn-realaudio;audio/x-ms-wma;audio/x-pls;audio/x-wav;audio/x-flac;audio/x-vorbis+ogg;audio/x-shorten;audio/x-ape;audio/x-wavpack;audio/x-tta;audio/AMR;audio/ac3;audio/flac;audio/mp4;
# Generic name with translations
GenericName=Audio Player
GenericName[be]=Аўдыёпрайгравальнік
GenericName[bg]=Аудио плеър
GenericName[bs]=Audio plejer
GenericName[ca]=Reproductor d'àudio
GenericName[ca@valencia]=Reproductor d'àudio
GenericName[cs]=Zvukový přehrávač
GenericName[csb]=Grôcz aùdio
GenericName[da]=Lydafspiller
GenericName[de]=Audio-Wiedergabe
GenericName[el]=Αναπαραγωγή ήχου
GenericName[en_GB]=Audio Player
GenericName[eo]=Sonludilo
GenericName[es]=Reproductor de audio
GenericName[et]=Helifailide mängija
GenericName[eu]=Audio erreproduzigailua
GenericName[fi]=Musiikkisoitin
GenericName[fr]=Lecteur audio
GenericName[ga]=Seinnteoir Fuaime
GenericName[gl]=Reprodutor de audio
GenericName[he]=נגן שמע
GenericName[hne]=आडियो प्लेयर
GenericName[hu]=Zenelejátszó
GenericName[is]=Tónlistarspilari
GenericName[it]=Lettore audio
GenericName[ja]=オーディオプレーヤー
GenericName[km]=កម្មវិធី​ចាក់​អូឌីយ៉ូ
GenericName[ko]=오디오 재생기
GenericName[ku]=Lêdarê Muzîkê
GenericName[lt]=Muzikos grotuvas
GenericName[lv]=Audio atskaņotājs
GenericName[mai]=आडियो प्लेयर
GenericName[ms]=Pemain Audio
GenericName[nb]=Lydavspiller
GenericName[nds]=Klangafspeler
GenericName[ne]=अडियो प्लेयर
GenericName[nl]=Audiospeler
GenericName[nn]=Musikkspelar
GenericName[pa]=ਆਡੀਓ ਪਲੇਅਰ
GenericName[pl]=Odtwarzacz dźwięku
GenericName[pt]=Leitor de Áudio
GenericName[pt_BR]=Reprodutor de áudio
GenericName[ro]=Redare audio
GenericName[ru]=Аудиопроигрыватель
GenericName[sk]=Audio prehrávač
GenericName[sl]=Predvajalnik glasbe
GenericName[sq]=Lexues audio
GenericName[sr]=Аудио плејер
GenericName[sr@ijekavian]=Аудио плејер
GenericName[sr@ijekavianlatin]=Audio plejer
GenericName[sr@latin]=Audio plejer
GenericName[sv]=Musikspelare
GenericName[th]=เครื่องเล่นเสียง
GenericName[tr]=Müzik Çalar
GenericName[ug]=ئۈن قويغۇچ
GenericName[uk]=Аудіопрогравач
GenericName[wa]=Djouweu d' son
......@@ -50,5 +50,6 @@
<file>assets/face-crying.svg</file>
<file>assets/face-sleeping.png</file>
<file>assets/face-hug.png</file>
<file>org.kde.babe.desktop</file>
</qresource>
</RCC>
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