Salome HOME
Fix problem with bad rendering of QtxColorButton when it is small.
authorvsr <vsr@opencascade.com>
Thu, 6 Apr 2017 17:10:26 +0000 (20:10 +0300)
committervsr <vsr@opencascade.com>
Thu, 6 Apr 2017 17:10:26 +0000 (20:10 +0300)
src/Qtx/QtxColorButton.cxx
src/Qtx/QtxColorButton.h

index 5ba0316403e7c35d025affadf9f72bcb39bc981e..3825fd5a64e22e77fc077876dcc41098d4101177 100644 (file)
@@ -413,6 +413,17 @@ QList<QColor> QtxColorButton::colorsList() const
   return lst;
 }
 
+/*!
+  \brief Get size hint for this widget.
+*/
+QSize QtxColorButton::sizeHint() const
+{
+  QSize sz = QToolButton::sizeHint();
+  sz.setWidth( sz.width() + 18 );
+  return sz;
+}
+
+
 /*!
   \fn void QtxColorButton::clicked( QColor color );
   \brief This signal is emitted when the widget button is clicked by
index 9f5472aeb2eda8809710901b5e37bf888811f27e..152cf5cd95c35bb5f5623397d10f5aef22803a6c 100644 (file)
@@ -51,6 +51,8 @@ public:
   QString       autoText() const;
   void          setAutoText( const QString& );
 
+  QSize         sizeHint() const;
+
 signals:
   void          clicked( QColor );
   void          changed( QColor );