Blob Blame Raw
/* -----------------------------------------------------------------------------
   UI Controls
----------------------------------------------------------------------------- */

// For Qt selectors we use placeholders and then extend to those.
// This is to avoid the compiler getting confused and extending the selector
// anywhere its called (even in nests).

.QPushButton {
  background-color: @button-bg-color;
  border: 1px solid @button-border-color;
  border-radius: @button-border-radius;
  color: @button-text-color;
  padding: 3px 15px;
  &:hover {
    background-color: @button-bg-color-hover;
    border-color: @button-border-color-hover;
    color: @button-text-color-hover;
  }
  &:pressed {
    background-color: @button-bg-color-pressed;
    border-color: @button-border-color-pressed;
    color: @button-text-color-pressed;
  }
  &:checked {
    background-color: @button-bg-color-checked;
    border-color: @button-border-color-checked;
    color: @button-text-color-checked;
    &:hover {
      background-color: @button-bg-color-checked-hover;
    }
  }
  &:disabled {
    background-color: @button-bg-color-disabled;
    border-color: @button-border-color-disabled;
    color: @button-text-color-disabled;
  }
}

QPushButton { // Default control
  &:extend(.QPushButton all);
}

#PushButton_NoPadding {
  padding: 3px;
}

/* Camera Capture */

#GearButton {
    qproperty-icon: url('@{img-url}/gear.svg');
}

#SubfolderButton {
    qproperty-icon: url('@{img-url}/subfolder.svg');
}

/* -------------------------------------------------------------------------- */

.QComboBox {
  &:extend(.QPushButton);
  padding: 1px 0 1px 5px;
  &:hover {
    &:extend(.QPushButton:hover);
  }
  &:disabled {
    &:extend(.QPushButton:disabled);
  }
  &::drop-down {
    border: 0;
  }
  &::down-arrow {
    image: url('@{img-url}/@{combo-down-arrow-img}');
    &:disabled {
      image: url('@{img-url}/@{combo-down-arrow-img-disabled}');
    }
  }
  & QAbstractItemView {
    background-color: @menu-bg-color;
    border: 1px solid @menu-border-color;
    selection-background-color: @selected-bg-color;
    selection-color: @selected-text-color;
  }
}

QComboBox { // Default control
  &:extend(.QComboBox all);
}

/* -------------------------------------------------------------------------- */

.QLineEdit {
  background-color: @input-bg-color;
  border: 1px solid @input-border-color;
  border-radius: @input-border-radius;
  color: @input-text-color;
  selection-background-color: @selected-bg-color;
  selection-color: @selected-text-color;
  padding: 0 0 0 1px;
  &:focus {
    background-color: @focus-bg-color;
    border-color: @focus-border-color;
  }
  &:disabled {
    background-color: @input-bg-color-disabled;
    border-color: @input-border-color-disabled;
    color: @input-text-color-disabled;
  }
}

QLineEdit { // Default control
  &:extend(.QLineEdit all);
}

/* -------------------------------------------------------------------------- */

.QCheckBox {
  color: @text-color;
  &:hover {
    color: @checkbox-text-color-hover;
  }
  &:disabled {
    color: @text-color-disabled;
  }
  &::indicator {
    background-color: @checkbox-bg-color;
    border: 1px solid @checkbox-border-color;
    border-radius: 2px;
    height: 9px; // fix for QGroupBox
    padding: 1px;
    width: 9px; // fix for QMenu
    &:hover {
      background-color: @checkbox-bg-color-hover;
      border-color: @checkbox-border-color-hover;
    }
    &:checked {
      background-color: @checkbox-bg-color-checked;
      border-color: @checkbox-border-color-checked;
      image: url('@{img-url}/@{checkbox-icon-checked}');
      &:hover {
        &:extend(.QCheckBox::indicator:hover);
      }
      &:disabled {
        background-color: @checkbox-bg-color-disabled;
        border-color: @checkbox-border-color-disabled;
        image: url('@{img-url}/@{checkbox-icon-disabled}');
      }
    }
    &:disabled {
      background-color: @checkbox-bg-color-disabled;
      border-color: @checkbox-border-color-disabled;
    }
  }
}

QCheckBox { // Default control
  &:extend(.QCheckBox all);
}

/* -------------------------------------------------------------------------- */

.QRadioButton {
  &::indicator {
    &:unchecked {
      image: url('@{img-url}/radiobutton_unchecked.svg');
      image-position: center center;
    }
    &:checked {
      image: url('@{img-url}/radiobutton_checked.svg');
      image-position: center center;
    }
  }
}

QRadioButton { // Default control
  &:extend(.QRadioButton all);
}

/* -------------------------------------------------------------------------- */

.QGroupBox {
  &:extend(.box-base); // components/boxes.less
  margin: 6px 0 0 0;
  padding: 5px 0px;
  &::title {
    subcontrol-origin: margin;
    left: 15px;
    margin: -3px 0 0 0;
    padding: 0 3px;
    &:disabled {
      color: @text-color-disabled;
    }
  }
  &::indicator {
    &:extend(.QCheckBox::indicator all);
    subcontrol-origin: margin;
    margin-top: 2px;
  }
  &:disabled {
    color: @text-color-disabled;
  }
}

QGroupBox { // Default control
  &:extend(.QGroupBox all);
}

/* -------------------------------------------------------------------------- */

.QSlider {
  &::groove:horizontal {
    background-color: transparent;
    background-image: url('@{img-url}/slider_groove.png');
    background-position: center center;
    background-repeat: repeat-x;
    margin: 0;
    height: 20px;
    min-height: 20px;
  }
  &::handle:horizontal {
    background: @slider-handle-bg-color;
    border: 1px solid @slider-handle-border-color;
    width: 9px;
    margin: 2px 0 2px 0;
    border-radius: 2px;
  }
}

QSlider { // Default control
  &:extend(.QSlider all);
}

#IntPairField, 
#DoublePairField {
	qproperty-LightLineColor: @slider-groove-color;
  qproperty-LightLineEdgeColor: @slider-groove-color; // new
	qproperty-DarkLineColor: @slider-groove-color;
  qproperty-MiddleLineColor: @slider-groove-color; // new
	qproperty-HandleLeftPixmap: url("@{img-url}/slider_left_handle.png");
	qproperty-HandleRightPixmap: url("@{img-url}/slider_right_handle.png");

	qproperty-HandleLeftGrayPixmap: url("@{img-url}/h_slider_left_disabled.png");
  qproperty-HandleRightGrayPixmap: url("@{img-url}/h_slider_right_disabled.png");
}