mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-02-26 12:53:41 +01:00
tighten up some margins
This commit is contained in:
parent
b465eaf5ad
commit
ec406e8f66
@ -28,6 +28,8 @@
|
||||
#include <QAction>
|
||||
#include <QEasingCurve>
|
||||
#include <QTimeLine>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@ -73,7 +75,6 @@ CollapsibleControls::init()
|
||||
connect( m_controls, SIGNAL( toggleCollapse() ), this, SLOT( toggleCollapse() ) );
|
||||
|
||||
m_summaryWidget = new QWidget( this );
|
||||
// TODO replace
|
||||
m_summaryWidget->setMinimumHeight( 24 );
|
||||
m_summaryWidget->setMaximumHeight( 24 );
|
||||
m_summaryWidget->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QPaintEvent;
|
||||
class QHBoxLayout;
|
||||
class QTimeLine;
|
||||
class QToolButton;
|
||||
@ -44,7 +45,6 @@ public:
|
||||
QList< DynamicControlWrapper* > controls() const;
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
signals:
|
||||
void controlsChanged();
|
||||
void controlChanged( const Tomahawk::dyncontrol_ptr& control );
|
||||
|
@ -71,8 +71,10 @@ DynamicControlList::init()
|
||||
m_collapseLayout->setMargin( 0 );
|
||||
m_collapseLayout->setSpacing( 0 );
|
||||
m_collapse = new QPushButton( tr( "Click to collapse" ), this );
|
||||
m_collapse->setAttribute( Qt::WA_LayoutUsesWidgetRect );
|
||||
m_collapseLayout->addWidget( m_collapse );
|
||||
m_addControl = new QToolButton( this );
|
||||
m_addControl->setAttribute( Qt::WA_LayoutUsesWidgetRect );
|
||||
m_addControl->setIcon( QIcon( RESPATH "images/list-add.png" ) );
|
||||
m_addControl->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||
m_addControl->setIconSize( QSize( 16, 16 ) );
|
||||
|
@ -116,6 +116,7 @@ QToolButton*
|
||||
DynamicControlWrapper::initButton( QWidget* parent )
|
||||
{
|
||||
QToolButton* btn = new QToolButton( parent );
|
||||
btn->setAttribute( Qt::WA_LayoutUsesWidgetRect );
|
||||
btn->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||
btn->setIconSize( QSize( 16, 16 ) );
|
||||
btn->setToolButtonStyle( Qt::ToolButtonIconOnly );
|
||||
@ -128,6 +129,7 @@ QWidget*
|
||||
DynamicControlWrapper::createDummy( QWidget* fromW, QWidget* parent )
|
||||
{
|
||||
QWidget* dummy = new QWidget( parent );
|
||||
dummy->setAttribute( Qt::WA_LayoutUsesWidgetRect );
|
||||
dummy->setContentsMargins( 0, 0, 0, 0 );
|
||||
dummy->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||
dummy->setMinimumSize( fromW->sizeHint() );
|
||||
|
@ -64,6 +64,7 @@ DynamicWidget::DynamicWidget( const Tomahawk::dynplaylist_ptr& playlist, QWidget
|
||||
m_headerLayout->addWidget( m_generatorCombo );
|
||||
|
||||
m_generateButton = new QPushButton( tr( "Generate" ), this );
|
||||
m_generateButton->setAttribute( Qt::WA_LayoutUsesWidgetRect );
|
||||
connect( m_generateButton, SIGNAL( clicked( bool ) ), this, SLOT( generateOrStart() ) );
|
||||
m_headerLayout->addWidget( m_generateButton );
|
||||
|
||||
@ -98,6 +99,7 @@ DynamicWidget::DynamicWidget( const Tomahawk::dynplaylist_ptr& playlist, QWidget
|
||||
|
||||
m_layout->setContentsMargins( 0, 0, 0, 0 );
|
||||
m_layout->setMargin( 0 );
|
||||
m_layout->setSpacing( 0 );
|
||||
setLayout( m_layout );
|
||||
|
||||
connect( m_controls, SIGNAL( controlChanged( Tomahawk::dyncontrol_ptr ) ), this, SLOT( controlChanged( Tomahawk::dyncontrol_ptr ) ), Qt::QueuedConnection );
|
||||
@ -310,4 +312,3 @@ DynamicWidget::generatorError( const QString& title, const QString& content )
|
||||
if( m_runningOnDemand )
|
||||
generateOrStart();
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,6 @@ public:
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
virtual void resizeEvent( QResizeEvent* );
|
||||
|
||||
public slots:
|
||||
void onRevisionLoaded( const Tomahawk::DynamicPlaylistRevision& rev );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user