added icons to effect controls
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -51,5 +51,10 @@
|
||||
<file>error.png</file>
|
||||
<file>dirup.png</file>
|
||||
<file>dirup-disabled.png</file>
|
||||
<file>diamond.png</file>
|
||||
<file>tri-down.png</file>
|
||||
<file>tri-left.png</file>
|
||||
<file>tri-right.png</file>
|
||||
<file>tri-up.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
+13
-7
@@ -27,29 +27,35 @@ EffectRow::EffectRow(Effect *parent, bool save, QGridLayout *uilayout, const QSt
|
||||
ui->addWidget(label, row, 0);
|
||||
|
||||
if (parent_effect->meta->type != EFFECT_TYPE_TRANSITION) {
|
||||
QSize button_size(20, 20);
|
||||
QSize icon_size(12, 12);
|
||||
QSize button_size(20, 20);
|
||||
|
||||
key_controls = new QHBoxLayout();
|
||||
key_controls->setSpacing(0);
|
||||
key_controls->setMargin(0);
|
||||
key_controls->addStretch();
|
||||
|
||||
left_key_nav = new QPushButton("<");
|
||||
left_key_nav->setVisible(false);
|
||||
left_key_nav = new QPushButton();
|
||||
left_key_nav->setIcon(QIcon(":/icons/tri-left.png"));
|
||||
left_key_nav->setMaximumSize(button_size);
|
||||
left_key_nav->setIconSize(icon_size);
|
||||
left_key_nav->setVisible(false);
|
||||
key_controls->addWidget(left_key_nav);
|
||||
connect(left_key_nav, SIGNAL(clicked(bool)), this, SLOT(goto_previous_key()));
|
||||
|
||||
key_addremove = new QPushButton(".");
|
||||
key_addremove->setVisible(false);
|
||||
key_addremove = new QPushButton();
|
||||
key_addremove->setIcon(QIcon(":/icons/diamond.png"));
|
||||
key_addremove->setMaximumSize(button_size);
|
||||
key_addremove->setIconSize(QSize(8, 8));
|
||||
key_addremove->setVisible(false);
|
||||
key_controls->addWidget(key_addremove);
|
||||
connect(key_addremove, SIGNAL(clicked(bool)), this, SLOT(toggle_key()));
|
||||
|
||||
right_key_nav = new QPushButton(">");
|
||||
right_key_nav->setVisible(false);
|
||||
right_key_nav = new QPushButton();
|
||||
right_key_nav->setIcon(QIcon(":/icons/tri-right.png"));
|
||||
right_key_nav->setMaximumSize(button_size);
|
||||
right_key_nav->setIconSize(icon_size);
|
||||
right_key_nav->setVisible(false);
|
||||
key_controls->addWidget(right_key_nav);
|
||||
connect(right_key_nav, SIGNAL(clicked(bool)), this, SLOT(goto_next_key()));
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ CollapsibleWidget::CollapsibleWidget(QWidget* parent) : QWidget(parent) {
|
||||
enabled_check = new CheckboxEx();
|
||||
enabled_check->setChecked(true);
|
||||
header = new QLabel();
|
||||
collapse_button = new QPushButton("[-]");
|
||||
collapse_button->setStyleSheet("QPushButton { border: none; } QPushButton:hover { text-decoration: underline; }");
|
||||
collapse_button->setMaximumWidth(25);
|
||||
collapse_button = new QPushButton();
|
||||
collapse_button->setIconSize(QSize(8, 8));
|
||||
collapse_button->setStyleSheet("QPushButton { border: none; }");
|
||||
setText("<untitled>");
|
||||
title_bar_layout->addWidget(collapse_button);
|
||||
title_bar_layout->addWidget(enabled_check);
|
||||
@@ -42,6 +42,7 @@ CollapsibleWidget::CollapsibleWidget(QWidget* parent) : QWidget(parent) {
|
||||
|
||||
connect(title_bar, SIGNAL(select(bool, bool)), this, SLOT(header_click(bool, bool)));
|
||||
|
||||
set_button_icon(true);
|
||||
|
||||
contents = NULL;
|
||||
}
|
||||
@@ -65,7 +66,11 @@ bool CollapsibleWidget::is_focused() {
|
||||
}
|
||||
|
||||
bool CollapsibleWidget::is_expanded() {
|
||||
return contents->isVisible();
|
||||
return contents->isVisible();
|
||||
}
|
||||
|
||||
void CollapsibleWidget::set_button_icon(bool open) {
|
||||
collapse_button->setIcon(open ? QIcon(":/icons/tri-down.png") : QIcon(":/icons/tri-right.png"));
|
||||
}
|
||||
|
||||
void CollapsibleWidget::setContents(QWidget* c) {
|
||||
@@ -88,7 +93,7 @@ void CollapsibleWidget::on_enabled_change(bool b) {
|
||||
|
||||
void CollapsibleWidget::on_visible_change() {
|
||||
contents->setVisible(!contents->isVisible());
|
||||
collapse_button->setText(contents->isVisible() ? "[-]" : "[+]");
|
||||
set_button_icon(contents->isVisible());
|
||||
emit visibleChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ private:
|
||||
QPushButton* collapse_button;
|
||||
QFrame* line;
|
||||
QHBoxLayout* title_bar_layout;
|
||||
void set_button_icon(bool open);
|
||||
|
||||
signals:
|
||||
void deselect_others(QWidget*);
|
||||
|
||||
Reference in New Issue
Block a user