{"id":3273,"url":"https://patchwork.libcamera.org/api/patches/3273/?format=json","web_url":"https://patchwork.libcamera.org/patch/3273/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200323173559.21109-8-laurent.pinchart@ideasonboard.com>","date":"2020-03-23T17:35:45","name":"[libcamera-devel,v2,07/21] qcam: main_window: Use icons from system icon theme","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"b2b7efb1ea6c47174515621c56e6f2fdafacd627","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3273/mbox/","series":[{"id":762,"url":"https://patchwork.libcamera.org/api/series/762/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=762","date":"2020-03-23T17:35:38","name":"qcam: Bypass format conversion when not required","version":2,"mbox":"https://patchwork.libcamera.org/series/762/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3273/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3273/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CAEFE62CC3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2020 18:36:18 +0100 (CET)","from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6B1FFA31\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2020 18:36:18 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584984978;\n\tbh=kx4gjDAMNtkpvOXxR9uIYamZfxIRWIZM0OCOZ9J/E/s=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=TBDRN2TaRHtFMMCr7NCJqkYqWkwRvXvzPjM7G6yJmIYSzEZUUAofQh2UC2VhYxahw\n\tWrT+c4JHB5jl6ZVBZ2a5qEBSg0365118/kEDgAqLWob4mnXb4QDx5gL/Wj0GZBl/xk\n\twlfwLgKRt0pcxbpsYqiSnIXfKs8LIy7U3hF2ly5A=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 23 Mar 2020 19:35:45 +0200","Message-Id":"<20200323173559.21109-8-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.24.1","In-Reply-To":"<20200323173559.21109-1-laurent.pinchart@ideasonboard.com>","References":"<20200323173559.21109-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 07/21] qcam: main_window: Use icons\n\tfrom system icon theme","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 23 Mar 2020 17:36:22 -0000"},"content":"Use the system icon theme by default, falling back to custom icons if no\ntheme is available.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\nChanges since v1:\n\n- Rebase on play/stop action toggle\n---\n src/qcam/main_window.cpp | 14 ++++++++++----\n 1 file changed, 10 insertions(+), 4 deletions(-)","diff":"diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex 74b8748c3347..9f008a57f9a1 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -96,7 +96,9 @@ int MainWindow::createToolbars()\n \t/* Disable right click context menu. */\n \ttoolbar_->setContextMenuPolicy(Qt::PreventContextMenu);\n \n-\taction = toolbar_->addAction(QIcon(\":x-circle.svg\"), \"Quit\");\n+\taction = toolbar_->addAction(QIcon::fromTheme(\"application-exit\",\n+\t\t\t\t\t\t      QIcon(\":x-circle.svg\")),\n+\t\t\t\t     \"Quit\");\n \tconnect(action, &QAction::triggered, this, &MainWindow::quit);\n \n \t/* Camera selection. */\n@@ -111,15 +113,19 @@ int MainWindow::createToolbars()\n \n \ttoolbar_->addSeparator();\n \n-\ticonPlay_ = QIcon(\":play-circle.svg\");\n-\ticonStop_ = QIcon(\":stop-circle.svg\");\n+\ticonPlay_ = QIcon::fromTheme(\"media-playback-start\",\n+\t\t\t\t     QIcon(\":play-circle.svg\"));\n+\ticonStop_ = QIcon::fromTheme(\"media-playback-stop\",\n+\t\t\t\t     QIcon(\":stop-circle.svg\"));\n \n \taction = toolbar_->addAction(iconPlay_, \"Start Capture\");\n \taction->setCheckable(true);\n \tconnect(action, &QAction::toggled, this, &MainWindow::toggleCapture);\n \tstartStopAction_ = action;\n \n-\taction = toolbar_->addAction(QIcon(\":save.svg\"), \"saveAs\");\n+\taction = toolbar_->addAction(QIcon::fromTheme(\"document-save-as\",\n+\t\t\t\t\t\t      QIcon(\":save.svg\")),\n+\t\t\t\t     \"Save As...\");\n \tconnect(action, &QAction::triggered, this, &MainWindow::saveImageAs);\n \n \treturn 0;\n","prefixes":["libcamera-devel","v2","07/21"]}