Skip to content

Commit

Permalink
Lint scss file
Browse files Browse the repository at this point in the history
  • Loading branch information
dpizetta committed Jun 17, 2019
1 parent 1a1c307 commit 5726a3a
Showing 1 changed file with 59 additions and 41 deletions.
100 changes: 59 additions & 41 deletions qdarkstyle/qss/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ QCheckBox {
image: url($PATH_RESOURCES + '/rc/checkbox_checked_focus.png');
}

&:disabled{
&:disabled {
image: url($PATH_RESOURCES + '/rc/checkbox_checked_disabled.png');
}
}
Expand Down Expand Up @@ -384,14 +384,15 @@ QMenu {

&::icon {
margin: 0px;
padding-left:4px;
padding-left: 4px;
}

&::item {
background-color: $COLOR_BACKGROUND_NORMAL;
padding: 4px 24px 4px 24px;
/* Reserve space for selection border */
border: 1px transparent $COLOR_BACKGROUND_NORMAL;

&:selected {
color: $COLOR_FOREGROUND_LIGHT;
}
Expand All @@ -400,7 +401,7 @@ QMenu {
&::indicator {
width: 12px;
height: 12px;
padding-left:6px;
padding-left: 6px;

/* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
&:non-exclusive {
Expand Down Expand Up @@ -476,8 +477,10 @@ QAbstractScrollArea {
background-color: $COLOR_BACKGROUND_DARK;
border: $BORDER_NORMAL;
border-radius: $SIZE_BORDER_RADIUS;
padding: 2px; /* fix #159 */
min-height: 1.25em; /* fix #159 */
padding: 2px;
/* fix #159 */
min-height: 1.25em;
/* fix #159 */
color: $COLOR_FOREGROUND_LIGHT;

&:disabled {
Expand Down Expand Up @@ -722,12 +725,15 @@ QToolBar {
QToolButton {
background-color: $COLOR_BACKGROUND_NORMAL;
border: $BORDER_NORMAL;

&:hover {
border: $BORDER_SELECTION_LIGHT;
}

&:checked {
border: $BORDER_DARK;
background-color: $COLOR_BACKGROUND_DARK;

&:hover {
border: $BORDER_SELECTION_LIGHT;
}
Expand All @@ -737,7 +743,7 @@ QToolBar {
&::handle {

&:horizontal {
width:16px;
width: 16px;
image: url($PATH_RESOURCES + '/rc/toolbar_move_horizontal.png');
}

Expand Down Expand Up @@ -879,7 +885,7 @@ QTextBrowser {
}

&:hover,
&:!hover,
&: !hover,
&::selected,
&::pressed {
border: $BORDER_NORMAL;
Expand All @@ -903,7 +909,7 @@ QGraphicsView {
}

&:hover,
&:!hover,
&: !hover,
&::selected,
&::pressed {
border: $BORDER_NORMAL;
Expand Down Expand Up @@ -1061,6 +1067,7 @@ QToolButton {
&:checked {
background-color: transparent;
border: $BORDER_SELECTION_NORMAL;

&:disabled {
border: $BORDER_SELECTION_DARK;
}
Expand All @@ -1074,6 +1081,7 @@ QToolButton {

&:disabled {
border: none;

&:hover {
border: $BORDER_NORMAL;
}
Expand All @@ -1096,7 +1104,7 @@ QToolButton {

&::menu-button {
border: none;
}
}
}

/* The subcontrol below is used only in the InstantPopup or DelayedPopup mode */
Expand Down Expand Up @@ -1128,8 +1136,10 @@ QToolButton {
image: url($PATH_RESOURCES + '/rc/arrow_down.png');
height: 12px;
width: 12px;
top: 0; /* Exclude a shift for better image */
left: -2px; /* Shift it a bit */
top: 0;
/* Exclude a shift for better image */
left: -2px;
/* Shift it a bit */
}

&::menu-arrow {
Expand Down Expand Up @@ -1202,12 +1212,12 @@ QComboBox {

/* Needed to remove indicator - fix #132 */
&::indicator {
background-color:transparent;
selection-background-color:transparent;
color:transparent;
selection-color:transparent;
background-color: transparent;
selection-background-color: transparent;
color: transparent;
selection-color: transparent;

/* Needed to remove indicator - fix #132 */
/* Needed to remove indicator - fix #132 */
&:alternate {
background: #19232D;
}
Expand Down Expand Up @@ -1243,6 +1253,7 @@ QComboBox {
image: url($PATH_RESOURCES + '/rc/arrow_down_disabled.png');
height: 12px;
width: 12px;

&:on,
&:hover,
&:focus {
Expand Down Expand Up @@ -1353,8 +1364,10 @@ https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qlineedit
--------------------------------------------------------------------------- */
QLineEdit {
background-color: $COLOR_BACKGROUND_DARK;
padding-top: 2px; /* This QLineEdit fix 103, 111 */
padding-bottom: 2px; /* This QLineEdit fix 103, 111 */
padding-top: 2px;
/* This QLineEdit fix 103, 111 */
padding-bottom: 2px;
/* This QLineEdit fix 103, 111 */
padding-left: 4px;
padding-right: 4px;
border-style: solid;
Expand Down Expand Up @@ -1470,47 +1483,47 @@ QTabBar {
}

/* !selected and disabled ----------------------------------------- */
&:top:!selected:disabled {
&:top: !selected:disabled {
border-bottom: 3px solid $COLOR_BACKGROUND_DARK;
color: $COLOR_FOREGROUND_DARK;
background-color: $COLOR_BACKGROUND_DARK;
}

&:bottom:!selected:disabled {
&:bottom: !selected:disabled {
border-top: 3px solid $COLOR_BACKGROUND_DARK;
color: $COLOR_FOREGROUND_DARK;
background-color: $COLOR_BACKGROUND_DARK;
}

&:left:!selected:disabled {
&:left: !selected:disabled {
border-right: 3px solid $COLOR_BACKGROUND_DARK;
color: $COLOR_FOREGROUND_DARK;
background-color: $COLOR_BACKGROUND_DARK;
}

&:right:!selected:disabled {
&:right: !selected:disabled {
border-left: 3px solid $COLOR_BACKGROUND_DARK;
color: $COLOR_FOREGROUND_DARK;
background-color: $COLOR_BACKGROUND_DARK;
}

/* selected ------------------------------------------------------- */
&:top:!selected {
&:top: !selected {
border-bottom: 2px solid $COLOR_BACKGROUND_DARK;
margin-top: 2px;
}

&:bottom:!selected {
&:bottom: !selected {
border-top: 2px solid $COLOR_BACKGROUND_DARK;
margin-bottom: 3px;
}

&:left:!selected {
&:left: !selected {
border-left: 2px solid $COLOR_BACKGROUND_DARK;
margin-right: 2px;
}

&:right:!selected {
&:right: !selected {
border-right: 2px solid $COLOR_BACKGROUND_DARK;
margin-left: 2px;
}
Expand All @@ -1536,7 +1549,7 @@ QTabBar {
border-top-right-radius: 3px;
}

&:!selected:hover {
&: !selected:hover {
border: $BORDER_SELECTION_LIGHT;
border-bottom: 3px solid $COLOR_SELECTION_LIGHT;
padding: 0px;
Expand Down Expand Up @@ -1564,7 +1577,7 @@ QTabBar {
border-bottom-right-radius: 3px;
}

&:!selected:hover {
&: !selected:hover {
border: $BORDER_SELECTION_LIGHT;
border-top: 3px solid $COLOR_SELECTION_LIGHT;
padding: 0px;
Expand All @@ -1590,7 +1603,7 @@ QTabBar {
border-right: 3px solid $COLOR_SELECTION_NORMAL;
}

&:!selected:hover {
&: !selected:hover {
border: $BORDER_SELECTION_LIGHT;
border-right: 3px solid $COLOR_SELECTION_LIGHT;
padding: 0px;
Expand All @@ -1616,7 +1629,7 @@ QTabBar {

}

&:!selected:hover {
&: !selected:hover {
border: $BORDER_SELECTION_LIGHT;
border-left: 3px solid $COLOR_SELECTION_LIGHT;
padding: 0px;
Expand All @@ -1632,6 +1645,7 @@ QTabBar {

&:pressed {
background-color: $COLOR_BACKGROUND_NORMAL;

&:hover {
border: $BORDER_SELECTION_LIGHT;
}
Expand Down Expand Up @@ -1681,6 +1695,7 @@ QDockWidget {
background-color: $COLOR_BACKGROUND_NORMAL;
border-radius: $SIZE_BORDER_RADIUS;
border: none;

&:hover {
image: url($PATH_RESOURCES + '/rc/window_close_focus.png');
}
Expand Down Expand Up @@ -1721,36 +1736,36 @@ QTreeView {
background: url($PATH_RESOURCES + '/rc/transparent.png');
}

&:has-siblings:!adjoins-item {
&:has-siblings: !adjoins-item {
border-image: url($PATH_RESOURCES + '/rc/branch_line.png') 0;
}

&:has-siblings:adjoins-item {
border-image: url($PATH_RESOURCES + '/rc/branch_more.png') 0;
}

&:!has-children:!has-siblings:adjoins-item {
&: !has-children: !has-siblings:adjoins-item {
border-image: url($PATH_RESOURCES + '/rc/branch_end.png') 0;
}

&:has-children:!has-siblings:closed,
&:has-children: !has-siblings:closed,
&:closed:has-children:has-siblings {
border-image: none;
image: url($PATH_RESOURCES + '/rc/branch_closed.png');
}

&:open:has-children:!has-siblings,
&:open:has-children: !has-siblings,
&:open:has-children:has-siblings {
border-image: none;
image: url($PATH_RESOURCES + '/rc/branch_open.png');
}

&:has-children:!has-siblings:closed:hover,
&:has-children: !has-siblings:closed:hover,
&:closed:has-children:has-siblings:hover {
image: url($PATH_RESOURCES + '/rc/branch_closed_focus.png');
}

&:open:has-children:!has-siblings:hover,
&:open:has-children: !has-siblings:hover,
&:open:has-children:has-siblings:hover {
image: url($PATH_RESOURCES + '/rc/branch_open_focus.png');
}
Expand Down Expand Up @@ -1829,15 +1844,15 @@ QColumnView {

&:hover {
background: $COLOR_SELECTION_NORMAL;
color: $COLOR_BACKGROUND_DARK;
color: $COLOR_BACKGROUND_DARK;
}

&:active {
background-color: $COLOR_SELECTION_NORMAL;
}
}

&:!selected {
&: !selected {

&:hover {
outline: 0;
Expand Down Expand Up @@ -1891,7 +1906,7 @@ QHeaderView {
}
}

&::horizontal {
&::horizontal {
border-left: $BORDER_DARK;

&::first,
Expand Down Expand Up @@ -1971,7 +1986,7 @@ QToolBox {
}
}

&:!selected {
&: !selected {
background-color: $COLOR_BACKGROUND_NORMAL;
border-bottom: 2px solid $COLOR_BACKGROUND_NORMAL;

Expand Down Expand Up @@ -2001,16 +2016,18 @@ https://doc.qt.io/qt-5/qframe.html#-prop
--------------------------------------------------------------------------- */

/* (dot) .QFrame fix #141, #126, #123 */
/* (dot) .QFrame fix #141, #126, #123 */

.QFrame {
border-radius: $SIZE_BORDER_RADIUS;
border: $BORDER_NORMAL;

/* No frame */
&[frameShape="0"] {
border-radius: $SIZE_BORDER_RADIUS;
border: 1px transparent $COLOR_BACKGROUND_NORMAL;
}

/* HLine and VLine respectivelly*/
&[height="3"],
&[width="3"] {
Expand Down Expand Up @@ -2086,6 +2103,7 @@ QDateEdit {
image: url($PATH_RESOURCES + '/rc/arrow_down_disabled.png');
height: 12px;
width: 12px;

&:on,
&:hover,
&:focus {
Expand Down

0 comments on commit 5726a3a

Please sign in to comment.