Permalink
Browse files

Style: Add 'flat' design

  • Loading branch information...
3unjee committed Sep 6, 2018
1 parent dc1b557 commit dcf5d5324f9af96c2448dd15c320861822e0bffa
@@ -133,7 +133,12 @@ MouseArea
GradientStop { position: 1.0; color: st.barTitle_colorB }
}

BorderHorizontal { color: st.barTitle_colorBorderLine }
BorderHorizontal
{
visible: (st.barTitle_colorA != st.barTitle_colorB)

color: st.barTitle_colorBorderLine
}

ButtonPushIcon
{
@@ -357,7 +357,12 @@ MouseArea
GradientStop { position: 1.0; color: st.barTitle_colorB }
}

BorderHorizontal { color: st.barTitle_colorBorderLine }
BorderHorizontal
{
visible: (st.barTitle_colorA != st.barTitle_colorB)

color: st.barTitle_colorBorderLine
}

ButtonPianoIcon
{
@@ -112,7 +112,7 @@ ContextualItem
source : st.icon_slideRight
sourceSize: st.size32x32

style: Sk.IconSunken
style: st.icon_sunken

filter: st.icon_filter
}
@@ -313,6 +313,8 @@ Item

Component.onCompleted:
{
if (local.style) st.applyFlat();

loadTabItems(currentTab);

if (local.browserVisible)
@@ -344,11 +346,6 @@ Item
player.output = local.output;
player.quality = local.quality;

if (local.networkCache == 0) player.backend.networkCache = 5000;
else if (local.networkCache == 1) player.backend.networkCache = 1000;
else if (local.networkCache == 2) player.backend.networkCache = 500;
else player.backend.networkCache = 200;

if (local.proxyActive)
{
var backend = player.backend;
@@ -608,8 +605,6 @@ Item

onIsPlayingChanged:
{
panelCover.updatePanel();

updateScreenDim();

if (player.isStopped)
@@ -757,8 +752,6 @@ Item
}
else panelPlayer.wallExpand(itemContent.width, itemContent.height);

panelCover.updatePanel();

local.expanded = true;

startActionCue(st.duration_normal);
@@ -791,8 +784,6 @@ Item
else panelPlayer.wallExpand(itemContent.width - panelLibrary.width,
panelPlayer.heightPlayer);

panelCover.updatePanel();

local.expanded = false;

startActionCue(st.duration_normal);
@@ -95,7 +95,7 @@ Item
source : st.icon32x32_folder
sourceSize: st.size32x32

style: Sk.IconRaised
style: st.icon_raised
}

ButtonPianoIcon
@@ -52,11 +52,11 @@ ItemTab

textColor: st.text1_color

textStyle: (isCurrent) ? Text.Raised
: Text.Sunken
textStyle: (isCurrent) ? st.text_raised
: st.text_sunken

iconStyle: (isCurrent) ? Sk.IconRaised
: Sk.IconSunken
iconStyle: (isCurrent) ? st.icon_raised
: st.icon_sunken

textStyleColor: (isCurrent) ? st.text1_colorShadow
: st.text1_colorSunken
@@ -920,7 +920,7 @@ List
source : st.icon32x32_search
sourceSize: st.size32x32

style: Sk.IconRaised
style: st.icon_raised
}

ButtonPushIcon
@@ -1332,7 +1332,7 @@ List
source : st.icon32x32_search
sourceSize: st.size32x32

style: Sk.IconRaised
style: st.icon_raised
}

CheckBox
@@ -113,7 +113,7 @@ Item

color: st.text3_color

style: Text.Raised
style: st.text_raised

font.pixelSize: st.dp14
}
@@ -29,27 +29,15 @@ Item
// Functions private
//---------------------------------------------------------------------------------------------

function pSetNetworkQuality(index)
function pSetStyle(index)
{
if (local.networkCache == index) return;

if (index == 0) player.backend.networkCache = 5000;
else if (index == 1) player.backend.networkCache = 1000;
else if (index == 2) player.backend.networkCache = 500;
else player.backend.networkCache = 200;

if (player.isPlaying)
if (index == 0)
{
player.keepState = true;

player.stop();
player.play();

player.keepState = false;
st.applyDefault();
}
else player.stop();
else st.applyFlat();

local.networkCache = index;
local.style = index;
}

//---------------------------------------------------------------------------------------------
@@ -225,38 +213,36 @@ Item

anchors.topMargin: st.dp3

enabled: (buttonsNetwork.currentIndex != 1)
enabled: (buttonsStyle.currentIndex != 1)

text: qsTr("Network stability")
text: qsTr("Style")

onReset: buttonsNetwork.pressAt(1)
onReset: buttonsStyle.pressAt(1)
}

ButtonsCheck
{
id: buttonsNetwork
id: buttonsStyle

anchors.left : parent.left
anchors.right: parent.right
anchors.top : barNetwork.bottom
anchors.left: parent.left
anchors.top : barNetwork.bottom

anchors.leftMargin : st.dp3
anchors.rightMargin: st.dp3
anchors.topMargin : st.dp3
anchors.leftMargin: st.dp3
anchors.topMargin : st.dp3

width: st.dp200

model: ListModel {}

currentIndex: local.networkCache
currentIndex: local.style

Component.onCompleted:
{
model.append({ "title": qsTr("Low") });
model.append({ "title": qsTr("Med") });
model.append({ "title": qsTr("High") });
model.append({ "title": qsTr("Ultra") });
model.append({ "title": qsTr("Default") });
model.append({ "title": qsTr("Flat") });
}

onPressed: pSetNetworkQuality(currentIndex)
onPressed: pSetStyle(currentIndex)
}

BarTitleSmall
@@ -265,7 +251,7 @@ Item

anchors.left : parent.left
anchors.right: parent.right
anchors.top : buttonsNetwork.bottom
anchors.top : buttonsStyle.bottom

anchors.topMargin: st.dp3
}
@@ -348,8 +348,6 @@ MouseArea
window.clearFocus();
}

panelCover.updatePanel();

local.browserVisible = true;

gui.startActionCue(st.duration_normal);
@@ -366,8 +364,6 @@ MouseArea
panelLibrary.visible = true;
panelTracks .visible = true;

panelCover.updatePanel();

local.browserVisible = false;

gui.startActionCue(st.duration_normal);
Oops, something went wrong.

0 comments on commit dcf5d53

Please sign in to comment.