switched png icons to svgs

This commit is contained in:
itsmattkc
2019-02-27 11:45:47 -08:00
parent d3487086c7
commit d9e95d3350
84 changed files with 168 additions and 228 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 971 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 749 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 745 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

+42 -68
View File
@@ -1,75 +1,49 @@
<RCC>
<qresource prefix="/icons">
<file>play.png</file>
<file>ff.png</file>
<file>next.png</file>
<file>pause.png</file>
<file>prev.png</file>
<file>rew.png</file>
<file>arrow.png</file>
<file>beam.png</file>
<file>razor.png</file>
<file>audiosource.png</file>
<file>videosource.png</file>
<file>imagesource.png</file>
<file>ripple.png</file>
<file>rolling.png</file>
<file>slip.png</file>
<file>ff-disabled.png</file>
<file>next-disabled.png</file>
<file>pause-disabled.png</file>
<file>play-disabled.png</file>
<file>prev-disabled.png</file>
<file>rew-disabled.png</file>
<file>arrow-disabled.png</file>
<file>beam-disabled.png</file>
<file>razor-disabled.png</file>
<file>ripple-disabled.png</file>
<file>rolling-disabled.png</file>
<file>slip-disabled.png</file>
<file>slide.png</file>
<file>slide-disabled.png</file>
<file>throbber.png</file>
<file>magnet.png</file>
<file>magnet-disabled.png</file>
<file>zoomin.png</file>
<file>zoomin-disabled.png</file>
<file>zoomout.png</file>
<file>zoomout-disabled.png</file>
<file>add-transition.png</file>
<file>add-effect.png</file>
<file>olive-splash.png</file>
<file>add-button.png</file>
<file>add-button-disabled.png</file>
<file>clock.png</file>
<file>sequence.png</file>
<file>folder.png</file>
<file>record.png</file>
<file>record-disabled.png</file>
<file>transition-tool.png</file>
<file>transition-tool-disabled.png</file>
<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>
<file>hand.png</file>
<file>hand-disabled.png</file>
<file>treeview.png</file>
<file>treeview-disabled.png</file>
<file>iconview.png</file>
<file>iconview-disabled.png</file>
<file>open.png</file>
<file>open-disabled.png</file>
<file>save.png</file>
<file>save-disabled.png</file>
<file>undo.png</file>
<file>undo-disabled.png</file>
<file>redo.png</file>
<file>redo-disabled.png</file>
<file>olive64.png</file>
<file>add-button.svg</file>
<file>add-effect.svg</file>
<file>add-transition.svg</file>
<file>arrow.svg</file>
<file>audiosource.svg</file>
<file>beam.svg</file>
<file>clock.svg</file>
<file>diamond.svg</file>
<file>dirup.svg</file>
<file>error.svg</file>
<file>ff.svg</file>
<file>folder.svg</file>
<file>hand.svg</file>
<file>iconview.svg</file>
<file>imagesource.svg</file>
<file>magnet.svg</file>
<file>new.svg</file>
<file>next.svg</file>
<file>open.svg</file>
<file>pause.svg</file>
<file>play.svg</file>
<file>prev.svg</file>
<file>razor.svg</file>
<file>record.svg</file>
<file>redo.svg</file>
<file>rew.svg</file>
<file>ripple.svg</file>
<file>rolling.svg</file>
<file>save.svg</file>
<file>sequence.svg</file>
<file>slide.svg</file>
<file>slip.svg</file>
<file>transition-tool.svg</file>
<file>treeview.svg</file>
<file>tri-down.svg</file>
<file>tri-left.svg</file>
<file>tri-right.svg</file>
<file>tri-up.svg</file>
<file>undo.svg</file>
<file>videosource.svg</file>
<file>zoomin.svg</file>
<file>zoomout.svg</file>
</qresource>
</RCC>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 735 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 734 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 824 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 783 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 976 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 882 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 796 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 845 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

+21
View File
@@ -297,6 +297,27 @@ void OliveGlobal::open_project_worker(const QString& fn, bool autorecovery) {
olive::UndoStack.clear();
}
QIcon OliveGlobal::CreateIconFromSVG(const QString &path)
{
QIcon icon;
QPixmap normal(path);
icon.addPixmap(normal, QIcon::Normal, QIcon::On);
QPixmap disabled(normal.size());
disabled.fill(Qt::transparent);
// draw semi-transparent version of icon for the disabled variant
QPainter p(&disabled);
p.setOpacity(0.5);
p.drawPixmap(0, 0, normal);
p.end();
icon.addPixmap(disabled, QIcon::Disabled, QIcon::On);
return icon;
}
void OliveGlobal::undo() {
// workaround to prevent crash (and also users should never need to do this)
if (!panel_timeline->importing) {
+9 -1
View File
@@ -115,6 +115,15 @@ public:
*/
void load_translation_from_config();
/**
* @brief Converts an SVG into a QIcon with a semi-transparent for the QIcon::Disabled property
*
* @param path
*
* Path to SVG file
*/
static QIcon CreateIconFromSVG(const QString& path);
public slots:
/**
* @brief Undo user's last action
@@ -315,7 +324,6 @@ private:
*/
std::unique_ptr<QTranslator> translator;
private slots:
};
+7 -4
View File
@@ -360,8 +360,11 @@ void EffectControls::setup_ui() {
veHeaderLayout->setSpacing(0);
veHeaderLayout->setMargin(0);
QIcon add_effect_icon(":/icons/add-effect.svg");
QIcon add_transition_icon(":/icons/add-transition.svg");
btnAddVideoEffect = new QPushButton();
btnAddVideoEffect->setIcon(QIcon(":/icons/add-effect.png"));
btnAddVideoEffect->setIcon(add_effect_icon);
veHeaderLayout->addWidget(btnAddVideoEffect);
connect(btnAddVideoEffect, SIGNAL(clicked(bool)), this, SLOT(video_effect_click()));
@@ -377,7 +380,7 @@ void EffectControls::setup_ui() {
veHeaderLayout->addStretch();
btnAddVideoTransition = new QPushButton();
btnAddVideoTransition->setIcon(QIcon(":/icons/add-transition.png"));
btnAddVideoTransition->setIcon(add_transition_icon);
connect(btnAddVideoTransition, SIGNAL(clicked(bool)), this, SLOT(video_transition_click()));
veHeaderLayout->addWidget(btnAddVideoTransition);
@@ -405,7 +408,7 @@ void EffectControls::setup_ui() {
aeHeaderLayout->setMargin(0);
btnAddAudioEffect = new QPushButton();
btnAddAudioEffect->setIcon(QIcon(":/icons/add-effect.png"));
btnAddAudioEffect->setIcon(add_effect_icon);
connect(btnAddAudioEffect, SIGNAL(clicked(bool)), this, SLOT(audio_effect_click()));
aeHeaderLayout->addWidget(btnAddAudioEffect);
@@ -419,7 +422,7 @@ void EffectControls::setup_ui() {
aeHeaderLayout->addStretch();
btnAddAudioTransition = new QPushButton();
btnAddAudioTransition->setIcon(QIcon(":/icons/add-transition.png"));
btnAddAudioTransition->setIcon(add_transition_icon);
connect(btnAddAudioTransition, SIGNAL(clicked(bool)), this, SLOT(audio_transition_click()));
aeHeaderLayout->addWidget(btnAddAudioTransition);
+1 -1
View File
@@ -179,7 +179,7 @@ void GraphEditor::set_row(EffectRow *r) {
QPushButton* slider_button = new QPushButton();
slider_button->setCheckable(true);
slider_button->setChecked(field->is_enabled());
slider_button->setIcon(QIcon(":/icons/record.png"));
slider_button->setIcon(QIcon(":/icons/record.svg"));
slider_button->setProperty("field", i);
slider_button->setIconSize(slider_button->iconSize()*0.5);
connect(slider_button, SIGNAL(toggled(bool)), this, SLOT(set_field_visibility(bool)));
+8 -33
View File
@@ -102,46 +102,31 @@ Project::Project(QWidget *parent) :
toolbar->setSpacing(0);
QPushButton* toolbar_new = new QPushButton();
QIcon icon1;
icon1.addFile(QStringLiteral(":/icons/add-button.png"), QSize(), QIcon::Normal, QIcon::On);
icon1.addFile(QStringLiteral(":/icons/add-button-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolbar_new->setIcon(icon1);
toolbar_new->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/add-button.svg")));
toolbar_new->setToolTip("New");
connect(toolbar_new, SIGNAL(clicked(bool)), this, SLOT(make_new_menu()));
toolbar->addWidget(toolbar_new);
QPushButton* toolbar_open = new QPushButton();
QIcon icon2;
icon2.addFile(QStringLiteral(":/icons/open.png"), QSize(), QIcon::Normal, QIcon::On);
icon2.addFile(QStringLiteral(":/icons/open-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolbar_open->setIcon(icon2);
toolbar_open->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/open.svg")));
toolbar_open->setToolTip("Open Project");
connect(toolbar_open, SIGNAL(clicked(bool)), olive::Global.get(), SLOT(open_project()));
toolbar->addWidget(toolbar_open);
QPushButton* toolbar_save = new QPushButton();
QIcon icon3;
icon3.addFile(QStringLiteral(":/icons/save.png"), QSize(), QIcon::Normal, QIcon::On);
icon3.addFile(QStringLiteral(":/icons/save-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolbar_save->setIcon(icon3);
toolbar_save->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/save.svg")));
toolbar_save->setToolTip("Save Project");
connect(toolbar_save, SIGNAL(clicked(bool)), olive::Global.get(), SLOT(save_project()));
toolbar->addWidget(toolbar_save);
QPushButton* toolbar_undo = new QPushButton();
QIcon icon4;
icon4.addFile(QStringLiteral(":/icons/undo.png"), QSize(), QIcon::Normal, QIcon::On);
icon4.addFile(QStringLiteral(":/icons/undo-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolbar_undo->setIcon(icon4);
toolbar_undo->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/undo.svg")));
toolbar_undo->setToolTip("Undo");
connect(toolbar_undo, SIGNAL(clicked(bool)), olive::Global.get(), SLOT(undo()));
toolbar->addWidget(toolbar_undo);
QPushButton* toolbar_redo = new QPushButton();
QIcon icon5;
icon5.addFile(QStringLiteral(":/icons/redo.png"), QSize(), QIcon::Normal, QIcon::On);
icon5.addFile(QStringLiteral(":/icons/redo-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolbar_redo->setIcon(icon5);
toolbar_redo->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/redo.svg")));
toolbar_redo->setToolTip("Redo");
connect(toolbar_redo, SIGNAL(clicked(bool)), olive::Global.get(), SLOT(redo()));
toolbar->addWidget(toolbar_redo);
@@ -152,19 +137,13 @@ Project::Project(QWidget *parent) :
toolbar->addWidget(toolbar_search);
QPushButton* toolbar_tree_view = new QPushButton();
QIcon icon6;
icon6.addFile(QStringLiteral(":/icons/treeview.png"), QSize(), QIcon::Normal, QIcon::On);
icon6.addFile(QStringLiteral(":/icons/treeview-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolbar_tree_view->setIcon(icon6);
toolbar_tree_view->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/treeview.svg")));
toolbar_tree_view->setToolTip("Tree View");
connect(toolbar_tree_view, SIGNAL(clicked(bool)), this, SLOT(set_tree_view()));
toolbar->addWidget(toolbar_tree_view);
QPushButton* toolbar_icon_view = new QPushButton();
QIcon icon7;
icon7.addFile(QStringLiteral(":/icons/iconview.png"), QSize(), QIcon::Normal, QIcon::On);
icon7.addFile(QStringLiteral(":/icons/iconview-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolbar_icon_view->setIcon(icon7);
toolbar_icon_view->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/iconview.svg")));
toolbar_icon_view->setToolTip("Icon View");
connect(toolbar_icon_view, SIGNAL(clicked(bool)), this, SLOT(set_icon_view()));
toolbar->addWidget(toolbar_icon_view);
@@ -194,12 +173,8 @@ Project::Project(QWidget *parent) :
icon_view_controls->setMargin(0);
icon_view_controls->setSpacing(0);
QIcon directory_up_button;
directory_up_button.addFile(":/icons/dirup.png", QSize(), QIcon::Normal);
directory_up_button.addFile(":/icons/dirup-disabled.png", QSize(), QIcon::Disabled);
directory_up = new QPushButton();
directory_up->setIcon(directory_up_button);
directory_up->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/dirup.svg")));
directory_up->setEnabled(false);
icon_view_controls->addWidget(directory_up);
+13 -52
View File
@@ -1871,123 +1871,84 @@ void Timeline::setup_ui() {
tool_buttons_layout->setMargin(0);
toolArrowButton = new QPushButton();
QIcon arrow_icon;
arrow_icon.addFile(QStringLiteral(":/icons/arrow.png"), QSize(), QIcon::Normal, QIcon::Off);
arrow_icon.addFile(QStringLiteral(":/icons/arrow-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
toolArrowButton->setIcon(arrow_icon);
toolArrowButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/arrow.svg")));
toolArrowButton->setCheckable(true);
toolArrowButton->setProperty("tool", TIMELINE_TOOL_POINTER);
connect(toolArrowButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolArrowButton);
toolEditButton = new QPushButton();
QIcon icon1;
icon1.addFile(QStringLiteral(":/icons/beam.png"), QSize(), QIcon::Normal, QIcon::Off);
icon1.addFile(QStringLiteral(":/icons/beam-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
toolEditButton->setIcon(icon1);
toolEditButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/beam.svg")));
toolEditButton->setCheckable(true);
toolEditButton->setProperty("tool", TIMELINE_TOOL_EDIT);
connect(toolEditButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolEditButton);
toolRippleButton = new QPushButton();
QIcon icon2;
icon2.addFile(QStringLiteral(":/icons/ripple.png"), QSize(), QIcon::Normal, QIcon::Off);
icon2.addFile(QStringLiteral(":/icons/ripple-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
toolRippleButton->setIcon(icon2);
toolRippleButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/ripple.svg")));
toolRippleButton->setCheckable(true);
toolRippleButton->setProperty("tool", TIMELINE_TOOL_RIPPLE);
connect(toolRippleButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolRippleButton);
toolRazorButton = new QPushButton();
QIcon icon4;
icon4.addFile(QStringLiteral(":/icons/razor.png"), QSize(), QIcon::Normal, QIcon::Off);
icon4.addFile(QStringLiteral(":/icons/razor-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
toolRazorButton->setIcon(icon4);
toolRazorButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/razor.svg")));
toolRazorButton->setCheckable(true);
toolRazorButton->setProperty("tool", TIMELINE_TOOL_RAZOR);
connect(toolRazorButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolRazorButton);
toolSlipButton = new QPushButton();
QIcon icon5;
icon5.addFile(QStringLiteral(":/icons/slip.png"), QSize(), QIcon::Normal, QIcon::On);
icon5.addFile(QStringLiteral(":/icons/slip-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolSlipButton->setIcon(icon5);
toolSlipButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/slip.svg")));
toolSlipButton->setCheckable(true);
toolSlipButton->setProperty("tool", TIMELINE_TOOL_SLIP);
connect(toolSlipButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolSlipButton);
toolSlideButton = new QPushButton();
QIcon icon6;
icon6.addFile(QStringLiteral(":/icons/slide.png"), QSize(), QIcon::Normal, QIcon::On);
icon6.addFile(QStringLiteral(":/icons/slide-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolSlideButton->setIcon(icon6);
toolSlideButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/slide.svg")));
toolSlideButton->setCheckable(true);
toolSlideButton->setProperty("tool", TIMELINE_TOOL_SLIDE);
connect(toolSlideButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolSlideButton);
toolHandButton = new QPushButton();
QIcon icon7;
icon7.addFile(QStringLiteral(":/icons/hand.png"), QSize(), QIcon::Normal, QIcon::On);
icon7.addFile(QStringLiteral(":/icons/hand-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolHandButton->setIcon(icon7);
toolHandButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/hand.svg")));
toolHandButton->setCheckable(true);
toolHandButton->setProperty("tool", TIMELINE_TOOL_HAND);
connect(toolHandButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolHandButton);
toolTransitionButton = new QPushButton();
QIcon icon8;
icon8.addFile(QStringLiteral(":/icons/transition-tool.png"), QSize(), QIcon::Normal, QIcon::On);
icon8.addFile(QStringLiteral(":/icons/transition-tool-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolTransitionButton->setIcon(icon8);
toolTransitionButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/transition-tool.svg")));
toolTransitionButton->setCheckable(true);
connect(toolTransitionButton, SIGNAL(clicked(bool)), this, SLOT(transition_tool_click()));
tool_buttons_layout->addWidget(toolTransitionButton);
snappingButton = new QPushButton();
QIcon icon9;
icon9.addFile(QStringLiteral(":/icons/magnet.png"), QSize(), QIcon::Normal, QIcon::On);
icon9.addFile(QStringLiteral(":/icons/magnet-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
snappingButton->setIcon(icon9);
snappingButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/magnet.svg")));
snappingButton->setCheckable(true);
snappingButton->setChecked(true);
connect(snappingButton, SIGNAL(toggled(bool)), this, SLOT(snapping_clicked(bool)));
tool_buttons_layout->addWidget(snappingButton);
zoomInButton = new QPushButton();
QIcon icon10;
icon10.addFile(QStringLiteral(":/icons/zoomin.png"), QSize(), QIcon::Normal, QIcon::On);
icon10.addFile(QStringLiteral(":/icons/zoomin-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
zoomInButton->setIcon(icon10);
zoomInButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/zoomin.svg")));
connect(zoomInButton, SIGNAL(clicked(bool)), this, SLOT(zoom_in()));
tool_buttons_layout->addWidget(zoomInButton);
zoomOutButton = new QPushButton();
QIcon icon11;
icon11.addFile(QStringLiteral(":/icons/zoomout.png"), QSize(), QIcon::Normal, QIcon::On);
icon11.addFile(QStringLiteral(":/icons/zoomout-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
zoomOutButton->setIcon(icon11);
zoomOutButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/zoomout.svg")));
connect(zoomOutButton, SIGNAL(clicked(bool)), this, SLOT(zoom_out()));
tool_buttons_layout->addWidget(zoomOutButton);
recordButton = new QPushButton();
QIcon icon12;
icon12.addFile(QStringLiteral(":/icons/record.png"), QSize(), QIcon::Normal, QIcon::On);
icon12.addFile(QStringLiteral(":/icons/record-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
recordButton->setIcon(icon12);
recordButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/record.svg")));
connect(recordButton, SIGNAL(clicked(bool)), this, SLOT(record_btn_click()));
tool_buttons_layout->addWidget(recordButton);
addButton = new QPushButton();
QIcon icon13;
icon13.addFile(QStringLiteral(":/icons/add-button.png"), QSize(), QIcon::Normal, QIcon::On);
icon13.addFile(QStringLiteral(":/icons/add-button-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
addButton->setIcon(icon13);
addButton->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/add-button.svg")));
connect(addButton, SIGNAL(clicked()), this, SLOT(add_btn_click()));
tool_buttons_layout->addWidget(addButton);
+10 -20
View File
@@ -37,6 +37,7 @@
#include "ui/labelslider.h"
#include "ui/timelineheader.h"
#include "ui/resizablescrollbar.h"
#include "oliveglobal.h"
#include "debug.h"
#define FRAMES_IN_ONE_MINUTE 1798 // 1800 - 2
@@ -668,41 +669,30 @@ void Viewer::setup_ui() {
playback_control_layout->setMargin(0);
go_to_start_button = new QPushButton();
QIcon goToStartIcon;
goToStartIcon.addFile(QStringLiteral(":/icons/prev.png"), QSize(), QIcon::Normal, QIcon::Off);
goToStartIcon.addFile(QStringLiteral(":/icons/prev-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
go_to_start_button->setIcon(goToStartIcon);
go_to_start_button->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/prev.svg")));
connect(go_to_start_button, SIGNAL(clicked(bool)), this, SLOT(go_to_in()));
playback_control_layout->addWidget(go_to_start_button);
prev_frame_button = new QPushButton();
QIcon rewindIcon;
rewindIcon.addFile(QStringLiteral(":/icons/rew.png"), QSize(), QIcon::Normal, QIcon::Off);
rewindIcon.addFile(QStringLiteral(":/icons/rew-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
prev_frame_button->setIcon(rewindIcon);
prev_frame_button->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/rew.svg")));
connect(prev_frame_button, SIGNAL(clicked(bool)), this, SLOT(previous_frame()));
playback_control_layout->addWidget(prev_frame_button);
play_icon_ = OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/play.svg"));
pause_icon_ = QPixmap(":/icons/pause.svg");
play_button = new QPushButton();
playIcon.addFile(QStringLiteral(":/icons/play.png"), QSize(), QIcon::Normal, QIcon::On);
playIcon.addFile(QStringLiteral(":/icons/play-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
play_button->setIcon(playIcon);
play_button->setIcon(play_icon_);
connect(play_button, SIGNAL(clicked(bool)), this, SLOT(toggle_play()));
playback_control_layout->addWidget(play_button);
next_frame_button = new QPushButton();
QIcon ffIcon;
ffIcon.addFile(QStringLiteral(":/icons/ff.png"), QSize(), QIcon::Normal, QIcon::On);
ffIcon.addFile(QStringLiteral(":/icons/ff-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
next_frame_button->setIcon(ffIcon);
next_frame_button->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/ff.svg")));
connect(next_frame_button, SIGNAL(clicked(bool)), this, SLOT(next_frame()));
playback_control_layout->addWidget(next_frame_button);
go_to_end_frame = new QPushButton();
QIcon nextIcon;
nextIcon.addFile(QStringLiteral(":/icons/next.png"), QSize(), QIcon::Normal, QIcon::Off);
nextIcon.addFile(QStringLiteral(":/icons/next-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
go_to_end_frame->setIcon(nextIcon);
go_to_end_frame->setIcon(OliveGlobal::CreateIconFromSVG(QStringLiteral(":/icons/next.svg")));
connect(go_to_end_frame, SIGNAL(clicked(bool)), this, SLOT(go_to_out()));
playback_control_layout->addWidget(go_to_end_frame);
@@ -917,5 +907,5 @@ void Viewer::set_sequence(bool main, SequencePtr s) {
}
void Viewer::set_playpause_icon(bool play) {
play_button->setIcon(play ? playIcon : QIcon(":/icons/pause.png"));
play_button->setIcon(play ? play_icon_ : pause_icon_);
}
+2 -1
View File
@@ -142,7 +142,8 @@ private:
long get_seq_in();
long get_seq_out();
QIcon playIcon;
QIcon play_icon_;
QIcon pause_icon_;
void setup_ui();
+2 -2
View File
@@ -86,7 +86,7 @@ void Media::set_footage(FootagePtr f) {
}
void Media::set_sequence(SequencePtr s) {
set_icon(QIcon(":/icons/sequence.png"));
set_icon(QIcon(":/icons/sequence.svg"));
type = MEDIA_TYPE_SEQUENCE;
object = VoidPtr(s);
if (s != nullptr) update_tooltip();
@@ -94,7 +94,7 @@ void Media::set_sequence(SequencePtr s) {
void Media::set_folder() {
if (folder_name.isEmpty()) folder_name = QCoreApplication::translate("Media", "New Folder");
set_icon(QIcon(":/icons/folder.png"));
set_icon(QIcon(":/icons/folder.svg"));
type = MEDIA_TYPE_FOLDER;
object = nullptr;
}
+6 -4
View File
@@ -59,6 +59,9 @@ CollapsibleWidget::CollapsibleWidget(QWidget* parent) : QWidget(parent) {
title_bar_layout->addStretch();
layout->addWidget(title_bar);
tri_down_ = QIcon(":/icons/tri-down.svg");
tri_right_ = QIcon(":/icons/tri-right.svg");
connect(title_bar, SIGNAL(select(bool, bool)), this, SLOT(header_click(bool, bool)));
set_button_icon(true);
@@ -89,7 +92,7 @@ bool CollapsibleWidget::is_expanded() {
}
void CollapsibleWidget::set_button_icon(bool open) {
collapse_button->setIcon(open ? QIcon(":/icons/tri-down.png") : QIcon(":/icons/tri-right.png"));
collapse_button->setIcon(open ? tri_down_ : tri_right_);
}
void CollapsibleWidget::setContents(QWidget* c) {
@@ -135,8 +138,7 @@ void CollapsibleWidgetHeader::mousePressEvent(QMouseEvent* event) {
void CollapsibleWidgetHeader::paintEvent(QPaintEvent *event) {
QWidget::paintEvent(event);
QPainter p(this);
p.setPen(Qt::white);
int line_x = width() * 0.01;
p.setPen(Qt::white);
int line_y = height() - 1;
p.drawLine(line_x, line_y, width() - line_x - line_x, line_y);
p.drawLine(0, line_y, width(), line_y);
}
+39 -34
View File
@@ -22,58 +22,63 @@
#define COLLAPSIBLEWIDGET_H
#include <QWidget>
class QLabel;
class QCheckBox;
class QHBoxLayout;
class QVBoxLayout;
class QPushButton;
class QFrame;
class CheckboxEx;
#include <QLabel>
#include <QCheckBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>
#include <QFrame>
#include <QIcon>
#include "ui/checkboxex.h"
class CollapsibleWidgetHeader : public QWidget {
Q_OBJECT
Q_OBJECT
public:
CollapsibleWidgetHeader(QWidget* parent = 0);
bool selected;
CollapsibleWidgetHeader(QWidget* parent = 0);
bool selected;
protected:
void mousePressEvent(QMouseEvent* event);
void paintEvent(QPaintEvent *event);
void mousePressEvent(QMouseEvent* event);
void paintEvent(QPaintEvent *event);
signals:
void select(bool, bool);
void select(bool, bool);
};
class CollapsibleWidget : public QWidget
{
Q_OBJECT
Q_OBJECT
public:
CollapsibleWidget(QWidget* parent = 0);
void setContents(QWidget* c);
void setText(const QString &);
bool is_focused();
bool is_expanded();
CollapsibleWidget(QWidget* parent = 0);
void setContents(QWidget* c);
void setText(const QString &);
bool is_focused();
bool is_expanded();
CheckboxEx* enabled_check;
bool selected;
QWidget* contents;
CollapsibleWidgetHeader* title_bar;
CheckboxEx* enabled_check;
bool selected;
QWidget* contents;
CollapsibleWidgetHeader* title_bar;
private:
QLabel* header;
QVBoxLayout* layout;
QPushButton* collapse_button;
QFrame* line;
QHBoxLayout* title_bar_layout;
void set_button_icon(bool open);
QLabel* header;
QVBoxLayout* layout;
QPushButton* collapse_button;
QFrame* line;
QHBoxLayout* title_bar_layout;
void set_button_icon(bool open);
QIcon tri_right_;
QIcon tri_down_;
signals:
void deselect_others(QWidget*);
void visibleChanged();
void deselect_others(QWidget*);
void visibleChanged();
private slots:
void on_enabled_change(bool b);
void on_visible_change();
void on_enabled_change(bool b);
void on_visible_change();
public slots:
void header_click(bool s, bool deselect);
void header_click(bool s, bool deselect);
};
#endif // COLLAPSIBLEWIDGET_H
+4 -4
View File
@@ -35,7 +35,7 @@ KeyframeNavigator::KeyframeNavigator(QWidget *parent, bool addLeftPad) : QWidget
}
left_key_nav = new QPushButton(this);
left_key_nav->setIcon(QIcon(":/icons/tri-left.png"));
left_key_nav->setIcon(QIcon(":/icons/tri-left.svg"));
left_key_nav->setIconSize(left_key_nav->iconSize()*0.5);
left_key_nav->setVisible(false);
key_controls->addWidget(left_key_nav);
@@ -43,7 +43,7 @@ KeyframeNavigator::KeyframeNavigator(QWidget *parent, bool addLeftPad) : QWidget
connect(left_key_nav, SIGNAL(clicked(bool)), this, SIGNAL(clicked()));
key_addremove = new QPushButton(this);
key_addremove->setIcon(QIcon(":/icons/diamond.png"));
key_addremove->setIcon(QIcon(":/icons/diamond.svg"));
key_addremove->setIconSize(key_addremove->iconSize()*0.5);
key_addremove->setVisible(false);
key_controls->addWidget(key_addremove);
@@ -51,14 +51,14 @@ KeyframeNavigator::KeyframeNavigator(QWidget *parent, bool addLeftPad) : QWidget
connect(key_addremove, SIGNAL(clicked(bool)), this, SIGNAL(clicked()));
right_key_nav = new QPushButton(this);
right_key_nav->setIcon(QIcon(":/icons/tri-right.png"));
right_key_nav->setIcon(QIcon(":/icons/tri-right.svg"));
right_key_nav->setIconSize(right_key_nav->iconSize()*0.5);
right_key_nav->setVisible(false);
key_controls->addWidget(right_key_nav);
connect(right_key_nav, SIGNAL(clicked(bool)), this, SIGNAL(goto_next_key()));
connect(right_key_nav, SIGNAL(clicked(bool)), this, SIGNAL(clicked()));
keyframe_enable = new QPushButton(QIcon(":/icons/clock.png"), "", this);
keyframe_enable = new QPushButton(QIcon(":/icons/clock.svg"), "", this);
keyframe_enable->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
keyframe_enable->setIconSize(keyframe_enable->iconSize()*0.75);
keyframe_enable->setCheckable(true);
+4 -4
View File
@@ -54,13 +54,13 @@ void MediaIconService::SetMediaIcon(Media *media, int icon_type) {
switch (icon_type) {
case ICON_TYPE_VIDEO:
olive::project_model.set_icon(media, QIcon(":/icons/videosource.png"));
olive::project_model.set_icon(media, QIcon(":/icons/videosource.svg"));
break;
case ICON_TYPE_AUDIO:
olive::project_model.set_icon(media, QIcon(":/icons/audiosource.png"));
olive::project_model.set_icon(media, QIcon(":/icons/audiosource.svg"));
break;
case ICON_TYPE_IMAGE:
olive::project_model.set_icon(media, QIcon(":/icons/imagesource.png"));
olive::project_model.set_icon(media, QIcon(":/icons/imagesource.svg"));
break;
case ICON_TYPE_LOADING:
throbber_items_.append(media);
@@ -75,7 +75,7 @@ void MediaIconService::SetMediaIcon(Media *media, int icon_type) {
}
break;
case ICON_TYPE_ERROR:
olive::project_model.set_icon(media, QIcon(":/icons/error.png"));
olive::project_model.set_icon(media, QIcon(":/icons/error.svg"));
break;
}