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
+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) {