From f3c8bb929981efea31d2ae9910aec79c584db6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Netto?= Date: Mon, 3 Jun 2019 21:45:17 -0300 Subject: [PATCH] Changed button code to be transparent when there's no text. --- autotests/kjsfunctionstest.cpp | 2 +- ui/formwidgets.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/autotests/kjsfunctionstest.cpp b/autotests/kjsfunctionstest.cpp index 350cf2742..f0d24e2a0 100644 --- a/autotests/kjsfunctionstest.cpp +++ b/autotests/kjsfunctionstest.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2018 by Intevation GmbH * + * Copyright (C) 2019 by João Netto * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * diff --git a/ui/formwidgets.cpp b/ui/formwidgets.cpp index 087c8012e..4289d8bc3 100644 --- a/ui/formwidgets.cpp +++ b/ui/formwidgets.cpp @@ -385,6 +385,12 @@ PushButtonEdit::PushButtonEdit( Okular::FormFieldButton * button, QWidget * pare : QPushButton( parent ), FormWidgetIface( this, button ) { setText( button->caption() ); + + if( button->caption().isEmpty() ) + { + setFlat( true ); + } + setVisible( button->isVisible() ); setCursor( Qt::ArrowCursor ); }