Skip to content

Commit

Permalink
Coding conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLorenz committed Apr 20, 2019
1 parent 53942a1 commit e1df16c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/gui/widgets/TabWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ void TabWidget::addTab( QWidget * w, const QString & name, const char *pixmap, i
m_widgets[idx] = d;

// Position tab's window
if(!m_resizable) {
if (!m_resizable)
{
w->setFixedSize( width() - 4, height() - m_tabbarHeight );
}
w->move( 2, m_tabbarHeight - 1 );
Expand Down Expand Up @@ -193,9 +194,9 @@ void TabWidget::mousePressEvent( QMouseEvent * me )

void TabWidget::resizeEvent( QResizeEvent * )
{
if(!m_resizable)
if (!m_resizable)
{
for( widgetStack::iterator it = m_widgets.begin();
for ( widgetStack::iterator it = m_widgets.begin();
it != m_widgets.end(); ++it )
{
( *it ).w->setFixedSize( width() - 4, height() - m_tabbarHeight );
Expand Down Expand Up @@ -312,10 +313,10 @@ void TabWidget::wheelEvent( QWheelEvent * we )
// Let parent widgets know how much space this tab widget needs
QSize TabWidget::minimumSizeHint() const
{
if(m_resizable)
if (m_resizable)
{
int maxWidth = 0, maxHeight = 0;
for( widgetStack::const_iterator it = m_widgets.begin();
for ( widgetStack::const_iterator it = m_widgets.begin();
it != m_widgets.end(); ++it )
{
maxWidth = std::max(maxWidth, it->w->width());
Expand All @@ -326,9 +327,7 @@ QSize TabWidget::minimumSizeHint() const
// moved up by 1 pixel
return QSize(maxWidth + 4, maxHeight + m_tabbarHeight - 1);
}
else {
return QWidget::minimumSizeHint();
}
else { return QWidget::minimumSizeHint(); }
}


Expand Down

0 comments on commit e1df16c

Please sign in to comment.