summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-22 21:25:53 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-24 10:33:50 +0200
commite4c2c60b57bbda7bf1f1bb5b6d4a2e36bc9d5635 (patch)
treef8cbe9d27da672c598244d1d310111e04849e319 /src
parent15273b38dff309af52eb0b9454ade5f5cbb18ac0 (diff)
qcam: main_window: Use icons from system icon theme
Use the system icon theme by default, falling back to custom icons if no theme is available. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/qcam/main_window.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index 74b8748c..9f008a57 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -96,7 +96,9 @@ int MainWindow::createToolbars()
/* Disable right click context menu. */
toolbar_->setContextMenuPolicy(Qt::PreventContextMenu);
- action = toolbar_->addAction(QIcon(":x-circle.svg"), "Quit");
+ action = toolbar_->addAction(QIcon::fromTheme("application-exit",
+ QIcon(":x-circle.svg")),
+ "Quit");
connect(action, &QAction::triggered, this, &MainWindow::quit);
/* Camera selection. */
@@ -111,15 +113,19 @@ int MainWindow::createToolbars()
toolbar_->addSeparator();
- iconPlay_ = QIcon(":play-circle.svg");
- iconStop_ = QIcon(":stop-circle.svg");
+ iconPlay_ = QIcon::fromTheme("media-playback-start",
+ QIcon(":play-circle.svg"));
+ iconStop_ = QIcon::fromTheme("media-playback-stop",
+ QIcon(":stop-circle.svg"));
action = toolbar_->addAction(iconPlay_, "Start Capture");
action->setCheckable(true);
connect(action, &QAction::toggled, this, &MainWindow::toggleCapture);
startStopAction_ = action;
- action = toolbar_->addAction(QIcon(":save.svg"), "saveAs");
+ action = toolbar_->addAction(QIcon::fromTheme("document-save-as",
+ QIcon(":save.svg")),
+ "Save As...");
connect(action, &QAction::triggered, this, &MainWindow::saveImageAs);
return 0;