-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsMenu.qml
More file actions
49 lines (41 loc) · 1.09 KB
/
Copy pathSettingsMenu.qml
File metadata and controls
49 lines (41 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import QtQuick
import QtQuick.Window
import QtQuick.Layouts
Item {
width: 700
height: 600
//visible: settingsOn ? true : false
//visible: true
opacity: 1
property bool settingsOpen: false
property color settingsBgColor: Qt.lighter(colorItem.windowBgColor, .5)
function getFgColor(bgColor) {
var r = bgColor.r;
var g = bgColor.g;
var b = bgColor.b;
var fgBrightness = Math.sqrt(
0.241 * r * r +
0.691 * g * g +
0.068 * b * b
);
return fgBrightness;
}
property color settingsFgColor: getFgColor(settingsBgColor)
Rectangle {
anchors.fill: parent //this is imperative for subcomponents
color: settingsBgColor
Behavior on visible {
NumberAnimation {
//target: object
//property: "name"
duration: 200
easing.type: Easing.InOutQuad
}
}
Text {
id: settings_text
text: "Boobie text"
color: settingsFgColor
}
}
}