
/* ----------------- Buttons -------------------- */

QtViewerPushButton{
   min-width : 28px;
   max-width : 28px;
   min-height : 28px;
   max-height : 28px;
   padding: 0px;

}

QtViewerPushButton[mode="delete_button"] {
   image: url("theme_{{ id }}:/delete.svg");
}

QtViewerPushButton[mode="new_points"] {
  image: url("theme_{{ id }}:/new_points.svg");
}

QtViewerPushButton[mode="new_shapes"] {
  image: url("theme_{{ id }}:/new_shapes.svg");
}

QtViewerPushButton[mode="warning"] {
  image: url("theme_{{ id }}:/warning.svg");
}

QtViewerPushButton[mode="new_labels"] {
  image: url("theme_{{ id }}:/new_labels.svg");
}

QtViewerPushButton[mode="console"] {
  image: url("theme_{{ id }}:/console.svg");
}

QtViewerPushButton[mode="roll"] {
  image: url("theme_{{ id }}:/roll.svg");
}

QtViewerPushButton[mode="transpose"] {
  image: url("theme_{{ id }}:/transpose.svg");
}

QtViewerPushButton[mode="home"] {
  image: url("theme_{{ id }}:/home.svg");
}

QtViewerPushButton[mode="ndisplay_button"]:checked {
  image: url("theme_{{ id }}:/3D-toggle.svg");
  min-width: 49px;
  max-width: 49px;
  min-height: 28px;
  max-height: 28px;
  background: qlineargradient(
    x1: 0, y1: 0, x2: 1, y2: 0,
    stop: 0 {{ foreground }},
    stop: 0.3 {{ foreground }},
    stop: 0.5 {{ highlight }},
    stop: 1 {{ highlight }}
  );
}

QtViewerPushButton[mode="ndisplay_button"] {
  image: url("theme_{{ id }}:/2D-toggle.svg");
  min-width: 49px;
  max-width: 49px;
  min-height: 28px;
  max-height: 28px;
  background: qlineargradient(
    x1: 0, y1: 0, x2: 1, y2: 0,
    stop: 0 {{ highlight }},
    stop: 0.5 {{ highlight }},
    stop: 0.7 {{ foreground }},
    stop: 1 {{ foreground }}
  );
}

QtViewerPushButton[mode="grid_view_button"]:checked {
  image: url("theme_{{ id }}:/canvas-standard-view.svg");
}

QtViewerPushButton[mode="grid_view_button"] {
  image: url("theme_{{ id }}:/canvas-grid-view.svg");
}

QtModeRadioButton {
  min-height : 28px;
  padding: 0px;
}

QtModeRadioButton::indicator:unchecked {
  border-radius: 3px;
  width: 28px;
  height: 28px;
  padding: 0;
  background-color: {{ primary }};
}

QtModeRadioButton::indicator:checked {
  border-radius: 3px;
  height: 28px;
  width: 28px;
  padding: 0;
  background-color: {{ current }};
}


QtModeRadioButton::indicator:disabled {
  background-color: {{ darken(foreground, 20) }}
}

QtModeRadioButton::indicator:unchecked:hover {
  background-color: {{ highlight }};
}

QtModeRadioButton[mode="pan"]::indicator {
  image: url("theme_{{ id }}:/pan_arrows.svg");
}

QtModeRadioButton[mode="transform"]::indicator {
  image: url("theme_{{ id }}:/transform.svg");
}

QtModeRadioButton[mode="select"]::indicator {
  image: url("theme_{{ id }}:/select.svg");
}

QtModeRadioButton[mode="direct"]::indicator {
  image: url("theme_{{ id }}:/direct.svg");
}

QtModeRadioButton[mode="rectangle"]::indicator {
  image: url("theme_{{ id }}:/rectangle.svg");
}

QtModeRadioButton[mode="ellipse"]::indicator {
  image: url("theme_{{ id }}:/ellipse.svg");
  color: red;
}

QtModeRadioButton[mode="line"]::indicator {
  image: url("theme_{{ id }}:/line.svg");
}

QtModeRadioButton[mode="polyline"]::indicator {
  image: url("theme_{{ id }}:/polyline.svg");
}

QtModeRadioButton[mode="path"]::indicator {
  image: url("theme_{{ id }}:/path.svg");
}

QtModeRadioButton[mode="polygon"]::indicator {
  image: url("theme_{{ id }}:/polygon.svg");
}

QtModeRadioButton[mode="labels_polygon"]::indicator {
  image: url("theme_{{ id }}:/polygon.svg");
}

QtModeRadioButton[mode="polygon_lasso"]::indicator {
  image: url("theme_{{ id }}:/polygon_lasso.svg");
}

QtModeRadioButton[mode="vertex_insert"]::indicator {
  image: url("theme_{{ id }}:/vertex_insert.svg");
}

QtModeRadioButton[mode="vertex_remove"]::indicator {
  image: url("theme_{{ id }}:/vertex_remove.svg");
}

QtModeRadioButton[mode="paint"]::indicator {
  image: url("theme_{{ id }}:/paint.svg");
}

QtModeRadioButton[mode="fill"]::indicator {
  image: url("theme_{{ id }}:/fill.svg");
}

QtModeRadioButton[mode="picker"]::indicator {
  image: url("theme_{{ id }}:/picker.svg");
}

QtModeRadioButton[mode="erase"]::indicator {
    image: url("theme_{{ id }}:/erase.svg");
}

QtModeRadioButton[mode="pan_zoom"]::indicator {
    image: url("theme_{{ id }}:/zoom.svg");
}

QtModeRadioButton[mode="select_points"]::indicator {
    image: url("theme_{{ id }}:/select.svg");
}

QtModeRadioButton[mode="add_points"]::indicator {
    image: url("theme_{{ id }}:/add.svg");
}

QtModePushButton[mode="shuffle"] {
   image: url("theme_{{ id }}:/shuffle.svg");
}

QtModePushButton[mode="move_back"] {
   image: url("theme_{{ id }}:/move_back.svg");
}

QtModePushButton[mode="move_front"] {
   image: url("theme_{{ id }}:/move_front.svg");
}

QtModePushButton[mode="delete_shape"] {
   image: url("theme_{{ id }}:/delete_shape.svg");
}

QWidget[emphasized="true"] QtModePushButton[mode="delete_shape"]:pressed {
  background-color: {{ error }};
}


QtCopyToClipboardButton {
   background-color: {{ background }};
   margin: 0px;
   padding: 1px 1px 3px 2px;
   border: 0px;
   min-width: 18px;
   max-width: 18px;
   min-height: 18px;
   max-height: 18px;
   border-radius: 3px;
}

#QtCopyToClipboardButton {
  image: url("theme_{{ id }}:/copy_to_clipboard.svg");
}

QtPlayButton {
  border-radius: 2px;
  height: 13px;
  width: 13px;
  margin: 0px 2px;
  padding: 1px;
  border: 0px;
}

QtPlayButton[reverse=True] {
    image: url("theme_{{ id }}:/playback-reverse.svg");
}

QtPlayButton[reverse=False] {
  background: {{ foreground }};
  image: url("theme_{{ id }}:/playback-forward.svg");
}

QtPlayButton[reverse=True]:hover, QtPlayButton[reverse=False]:hover {
  background: {{ primary }};
}

QtPlayButton[playing=True]:hover {
  background-color: {{ lighten(error, 10) }};
}

QtPlayButton[playing=True] {
    image: url("theme_{{ id }}:/playback-stop.svg");
    background-color: {{ error }};
}
