Commit f3c8bb92 authored by Joao Oliveira's avatar Joao Oliveira Committed by Albert Astals Cid

Changed button code to be transparent when there's no text.

parent 7555212d
/*************************************************************************** /***************************************************************************
* Copyright (C) 2018 by Intevation GmbH <intevation@intevation.de> * * Copyright (C) 2019 by João Netto <joaonetto901@gmail.com> *
* * * *
* This program is free software; you can redistribute it and/or modify * * 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 * * it under the terms of the GNU General Public License as published by *
......
...@@ -385,6 +385,12 @@ PushButtonEdit::PushButtonEdit( Okular::FormFieldButton * button, QWidget * pare ...@@ -385,6 +385,12 @@ PushButtonEdit::PushButtonEdit( Okular::FormFieldButton * button, QWidget * pare
: QPushButton( parent ), FormWidgetIface( this, button ) : QPushButton( parent ), FormWidgetIface( this, button )
{ {
setText( button->caption() ); setText( button->caption() );
if( button->caption().isEmpty() )
{
setFlat( true );
}
setVisible( button->isVisible() ); setVisible( button->isVisible() );
setCursor( Qt::ArrowCursor ); setCursor( Qt::ArrowCursor );
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment