[{"id":31124,"web_url":"https://patchwork.libcamera.org/comment/31124/","msgid":"<172588555211.2319503.11723294140709137603@ping.linuxembedded.co.uk>","date":"2024-09-09T12:39:12","subject":"Re: [PATCH 2/2] qcam: viewfinder_qt: Render stopped icon on a black\n\tbackground","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-09-05 17:25:08)\n> To match the black letterboxes, render the stoppid icon on a black\n\ns/stoppid/stopped/\n\n> background.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/apps/qcam/assets/feathericons/camera-off.svg | 2 +-\n>  src/apps/qcam/viewfinder_qt.cpp                  | 5 +++--\n>  2 files changed, 4 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/apps/qcam/assets/feathericons/camera-off.svg b/src/apps/qcam/assets/feathericons/camera-off.svg\n> index daa3e25f0c1d..2d36b59c8b52 100644\n> --- a/src/apps/qcam/assets/feathericons/camera-off.svg\n> +++ b/src/apps/qcam/assets/feathericons/camera-off.svg\n> @@ -1 +1 @@\n> -<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-camera-off\"><line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"></line><path d=\"M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56\"></path></svg>\n> \\ No newline at end of file\n> +<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#c0c0c0\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-camera-off\"><line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"></line><path d=\"M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56\"></path></svg>\n> diff --git a/src/apps/qcam/viewfinder_qt.cpp b/src/apps/qcam/viewfinder_qt.cpp\n> index 62b6f27fa23e..b0d63f3fa5ea 100644\n> --- a/src/apps/qcam/viewfinder_qt.cpp\n> +++ b/src/apps/qcam/viewfinder_qt.cpp\n> @@ -48,6 +48,8 @@ ViewFinderQt::ViewFinderQt(QWidget *parent)\n>         QPalette pal = palette();\n>         pal.setColor(QPalette::Window, Qt::black);\n>         setPalette(pal);\n> +\n> +       setAttribute(Qt::WA_OpaquePaintEvent, true);\n>  }\n>  \n>  ViewFinderQt::~ViewFinderQt()\n> @@ -122,7 +124,6 @@ void ViewFinderQt::render(libcamera::FrameBuffer *buffer, Image *image)\n>                 }\n>         }\n>  \n> -       setAttribute(Qt::WA_OpaquePaintEvent, true);\n>         update();\n>  \n>         if (buffer)\n> @@ -138,7 +139,6 @@ void ViewFinderQt::stop()\n>                 buffer_ = nullptr;\n>         }\n>  \n> -       setAttribute(Qt::WA_OpaquePaintEvent, false);\n\nOh - so now these are redundant... Probably not worth adding the\ncomments in the previous patch if they'll just be removed here then.\n\n\nI find this version a bit ... garish ? I'm not sure. Slight personal\npreference on the original without this patch - but no objection to this\none either.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n>         update();\n>  }\n>  \n> @@ -194,6 +194,7 @@ void ViewFinderQt::paintEvent(QPaintEvent *)\n>         else\n>                 point.setY((height() - pixmap_.height()) / 2);\n>  \n> +       painter.drawRect(rect());\n>         painter.drawPixmap(point, pixmap_);\n>  }\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id ED21DC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Sep 2024 12:39:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D7919634F7;\n\tMon,  9 Sep 2024 14:39:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 41EF1634EB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Sep 2024 14:39:15 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E82C83DA;\n\tMon,  9 Sep 2024 14:37:58 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QjF6H9IE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1725885479;\n\tbh=IbEdIlbb67uMMRbBsYNeyqtuwN9S2b+Zt1sVTxHm2tk=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=QjF6H9IE+P+rwXC4Jybtiuh6xWxKnAVEZ3D9m886JD7qd7Ay17rPavBbW2gBTDH13\n\tOBMA7xr/XV0DHsk8nigVIWBNxPfkszjjR6zzCq1XSCFy+qs4Fnqy5s9ccEword6XJt\n\tgmsVHZYPIwzgw37wbowxSaE1JMnqRDfQvsQwDlC4=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240905162508.4169-3-laurent.pinchart@ideasonboard.com>","References":"<20240905162508.4169-1-laurent.pinchart@ideasonboard.com>\n\t<20240905162508.4169-3-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 2/2] qcam: viewfinder_qt: Render stopped icon on a black\n\tbackground","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 09 Sep 2024 13:39:12 +0100","Message-ID":"<172588555211.2319503.11723294140709137603@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]