vastly improved audio

This commit is contained in:
itsmattkc
2018-08-14 20:25:56 +10:00
parent d549586761
commit aa1096d86a
19 changed files with 237 additions and 146 deletions
+3 -2
View File
@@ -16,23 +16,24 @@ QColor ColorButton::get_color() {
void ColorButton::set_color(QColor c) {
color = c;
set_button_color();
}
void ColorButton::set_button_color() {
QPalette pal = palette();
pal.setColor(QPalette::Button, color);
setPalette(pal);
emit color_changed();
}
void ColorButton::open_dialog() {
QColor old_color = color;
QColor new_color = QColorDialog::getColor(color, NULL);
if (old_color != new_color) {
if (new_color.isValid() && old_color != new_color) {
ColorCommand* command = new ColorCommand(this, old_color, new_color);
undo_stack.push(command);
set_button_color();
emit color_changed();
}
}