--- a/HelperStructs/Style.cpp
+++ b/HelperStructs/Style.cpp
@@ -25,31 +25,32 @@
#define NEWLINE "\n";
-QString Style::get_style(bool dark){
-
+QString Style::get_style(bool dark)
+{
QString style;
- if(!dark)
- Helper::read_file_into_str(Helper::getSharePath() + "/standard.css", &style);
-
- else
- Helper::read_file_into_str(Helper::getSharePath() + "/dark.css", &style);
-
+ if (!dark) {
+ Helper::read_file_into_str(Helper::getSharePath() + "standard.css",
+ &style);
+ } else {
+ Helper::read_file_into_str(Helper::getSharePath() + "dark.css", &style);
+ }
return style;
}
-QString Style::get_tv_style(bool dark, QPalette* p){
-
-
+QString Style::get_tv_style(bool /*dark*/, QPalette*)
+{
return "";
-
}
-QString Style::get_v_slider_style(bool dark, int percent){
- if(!dark) return "";
+QString Style::get_v_slider_style(bool dark, int percent)
+{
+ if (!dark) {
+ return "";
+ }
percent = 0;
QString darker_grey = "#2B2B2B";
@@ -60,17 +61,14 @@
QString orange = "#e8841a";
QString back_col = orange;
- if(percent > 0)
- {
+ if (percent > 0) {
double p = percent * 1.0 / 100.0;
int r, g, b;
b = 0;
- if(p < 0.6) {
- r=255;
- }
-
- else {
- r = (-255.0 / 0.6) * (p-0.6) + 255;
+ if (p < 0.6) {
+ r = 255;
+ } else {
+ r = (-255.0 / 0.6) * (p - 0.6) + 255;
}
g = (255.0) * p;
@@ -90,53 +88,53 @@
QString style = QString("QSlider {") +
- "border-radius: 4px; " +
- "background: #383838; " +
+ "border-radius: 4px; " +
+ "background: #383838; " +
- "}" +
+ "}" +
- "QSlider::handle:vertical {" +
- " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, "+
- " stop: 0 #6B6B6B, stop: 0.4 " + dark_grey + ");" +
- " height: 10px;" +
- " margin-left: -5px; " +
- " margin-right: -5px; " +
- " min-width: 12px;" +
- " border: 1px solid #2C2C2C; " +
- " border-radius: 4px; " +
- "}" +
+ "QSlider::handle:vertical {" +
+ " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, " +
+ " stop: 0 #6B6B6B, stop: 0.4 " + dark_grey + ");" +
+ " height: 10px;" +
+ " margin-left: -5px; " +
+ " margin-right: -5px; " +
+ " min-width: 12px;" +
+ " border: 1px solid #2C2C2C; " +
+ " border-radius: 4px; " +
+ "}" +
- "QSlider::handle:vertical:disabled {" +
- " background: transparent;"
- " height: 0px;"
- " border-width: 0px;"
- "}" +
+ "QSlider::handle:vertical:disabled {" +
+ " background: transparent;"
+ " height: 0px;"
+ " border-width: 0px;"
+ "}" +
- "QSlider::groove:vertical { " +
- " background: #383838;" +
- " width: 6px; " +
- " left: 10px; right: 10px; " +
- "}" +
+ "QSlider::groove:vertical { " +
+ " background: #383838;" +
+ " width: 6px; " +
+ " left: 10px; right: 10px; " +
+ "}" +
- "QSlider::add-page:vertical {"+
- /*" background-color: qlineargradient(x1:0, y1:0, x2:1, y2:0, " +
- " stop:0 #E88417, stop: 0.3 #C46600, " +
- " stop: 0.7 #C46600, stop:1 #E88417); " +*/
- //" background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(255, 0, 0, 255), stop:0.505051 rgba(255, 228, 0, 255), stop:1 rgba(55, 239, 78, 255)); "
+ "QSlider::add-page:vertical {" +
+ /*" background-color: qlineargradient(x1:0, y1:0, x2:1, y2:0, " +
+ " stop:0 #E88417, stop: 0.3 #C46600, " +
+ " stop: 0.7 #C46600, stop:1 #E88417); " +*/
+ //" background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(255, 0, 0, 255), stop:0.505051 rgba(255, 228, 0, 255), stop:1 rgba(55, 239, 78, 255)); "
- " background-color: " + back_col + "; "
- " border-radius: 2px;" +
+ " background-color: " + back_col + "; "
+ " border-radius: 2px;" +
- "}"+
+ "}" +
- "QSlider::sub-page:vertical, QSlider::add-page:vertical:disabled {"+
- " background: " + darker_grey + ";"+
- // " background-color: " + back_col + "; "
- " border-radius: 2px;" +
+ "QSlider::sub-page:vertical, QSlider::add-page:vertical:disabled {" +
+ " background: " + darker_grey + ";" +
+ // " background-color: " + back_col + "; "
+ " border-radius: 2px;" +
- "}";
+ "}";
return style;
}