1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-04 13:17:34 +02:00

resize dialog when it changes size, and hide/show

otherwise osx goes CRAZY PANTS
This commit is contained in:
Leo Franchi
2011-06-01 20:29:54 -04:00
parent b4e0674e2b
commit e130fc41ed
3 changed files with 14 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ public:
setSizeGripEnabled( false ); setSizeGripEnabled( false );
setMinimumSize( sizeHint() ); setMinimumSize( sizeHint() );
setMaximumSize( sizeHint() ); // to remove the resize grip on osx this is the only way setMaximumSize( sizeHint() ); // to remove the resize grip on osx this is the only way
connect( conf, SIGNAL( sizeHintChanged() ), this, SLOT( updateSizeHint() ) );
#endif #endif
} }
public slots: public slots:
@@ -72,6 +74,15 @@ public slots:
m_widget->setVisible( false ); m_widget->setVisible( false );
} }
void updateSizeHint() {
hide();
setSizeGripEnabled( false );
setMinimumSize( sizeHint() );
setMaximumSize( sizeHint() );
show();
}
private: private:
QWidget* m_widget; QWidget* m_widget;
}; };

View File

@@ -132,6 +132,7 @@ TwitterConfigWidget::authenticateVerifyReply( const QTweetUser &user )
m_plugin->connectPlugin( false ); m_plugin->connectPlugin( false );
emit twitterAuthed( true ); emit twitterAuthed( true );
emit sizeHintChanged();
} }
void void
@@ -161,6 +162,7 @@ TwitterConfigWidget::deauthenticateTwitter()
ui->twitterTweetComboBox->setVisible( false ); ui->twitterTweetComboBox->setVisible( false );
emit twitterAuthed( false ); emit twitterAuthed( false );
emit sizeHintChanged();
} }
void void

View File

@@ -45,6 +45,7 @@ public:
signals: signals:
void twitterAuthed( bool authed ); void twitterAuthed( bool authed );
void sizeHintChanged();
private slots: private slots:
void authDeauthTwitter(); void authDeauthTwitter();
void startPostGotTomahawkStatus(); void startPostGotTomahawkStatus();