Skip to content
Permalink
Browse files

Resize the news feed splitter if we can and grow it to 50% if it is zero

(cherry picked from commit 2a988e8)
  • Loading branch information
timlinux authored and nyalldawson committed Sep 11, 2020
1 parent 4362353 commit bf6266d04da03ebb8556b5e1a2b9adabe746d378
Showing with 10 additions and 3 deletions.
  1. +2 −0 src/app/qgisapp.cpp
  2. +1 −1 src/app/qgsoptions.cpp
  3. +5 −2 src/app/qgswelcomepage.cpp
  4. +2 −0 src/app/qgswelcomepage.h
@@ -11129,6 +11129,8 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString &currentPage, in
double factor = mySettings.value( QStringLiteral( "qgis/magnifier_factor_default" ), 1.0 ).toDouble();
mMagnifierWidget->setDefaultFactor( factor );
mMagnifierWidget->updateMagnification( factor );

mWelcomePage->updateNewsFeedVisibility();
}
}

@@ -666,7 +666,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
mSimplifyAlgorithmComboBox->addItem( tr( "Visvalingam" ), static_cast<int>( QgsVectorSimplifyMethod::Visvalingam ) );
mSimplifyAlgorithmComboBox->setCurrentIndex( mSimplifyAlgorithmComboBox->findData( mSettings->enumValue( QStringLiteral( "/qgis/simplifyAlgorithm" ), QgsVectorSimplifyMethod::NoSimplification ) ) );

// Slightly awkard here at the settings value is true to use QImage,
// Slightly awkward here at the settings value is true to use QImage,
// but the checkbox is true to use QPixmap
chkAddedVisibility->setChecked( mSettings->value( QStringLiteral( "/qgis/new_layers_visible" ), true ).toBool() );
cbxLegendClassifiers->setChecked( mSettings->value( QStringLiteral( "/qgis/showLegendClassifiers" ), false ).toBool() );
@@ -438,8 +438,11 @@ void QgsWelcomePage::updateNewsFeedVisibility()
else
{
mSplitter2->restoreState( QgsSettings().value( QStringLiteral( "Windows/WelcomePage/SplitState2" ), QVariant(), QgsSettings::App ).toByteArray() );
int splitSize = mSplitter2->height() / 2;
mSplitter2->setSizes( QList< int > { splitSize, splitSize} );
if ( mSplitter2->sizes().first() == 0 )
{
int splitSize = mSplitter2->height() / 2;
mSplitter2->setSizes( QList< int > { splitSize, splitSize} );
}
}
}

@@ -63,6 +63,8 @@ class QgsWelcomePage : public QWidget
void showContextMenuForProjects( QPoint point );
void showContextMenuForTemplates( QPoint point );
void showContextMenuForNews( QPoint point );

public slots:
void updateNewsFeedVisibility();

private:

0 comments on commit bf6266d

Please sign in to comment.
You can’t perform that action at this time.