Fix visibility option

This commit is contained in:
Ximi1970
2023-11-02 19:44:16 +01:00
parent c1b2db9c73
commit 9be64d2dc4
3 changed files with 19 additions and 9 deletions

View File

@@ -85,6 +85,8 @@ Preferences::Preferences( QObject *parent ) : QObject( parent )
m_version_hash = QLatin1String( APP_GITHASH );
m_version_branch = QLatin1String( APP_GITBRANCH );
m_browser_version = "0.0.0";
m_start_app = "";
m_start_app_args = "";
m_close_app = "";

View File

@@ -115,15 +115,6 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi
m_ui->newIndicatorTypeGroup->setId( m_ui->newIconStarRadioButton, Preferences::PREF_NEW_INDICATOR_STAR );
m_ui->newIndicatorTypeGroup->setId( m_ui->newShadeRadioButton, Preferences::PREF_NEW_INDICATOR_SHADE);
if( m_pref->getBrowserVersion().split(".")[0].toInt() < 115 )
{
m_ui->specialOptionsGroupBox->setVisible( false );
}
else
{
setApiCountMethod( m_pref->getApiCountMethod() );
}
/*
* Signals and slots
*/
@@ -154,6 +145,11 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi
*/
setStartupDelay( m_pref->getStartupDelay() );
/*
* Set API count method
*/
setApiCountMethod( m_pref->getApiCountMethod() );
/*
* Set number alignment
*/
@@ -542,6 +538,16 @@ void PreferencesDialog::setApiCountMethod( bool state )
*/
void PreferencesDialog::slotShowDialog()
{
QString version = m_pref->getBrowserVersion().split(".")[0];
if( version.toInt() < 115 )
{
m_ui->specialOptionsGroupBox->setVisible( false );
}
else
{
m_ui->specialOptionsGroupBox->setVisible( true );
}
showNormal();
activateWindow();
}

View File

@@ -206,6 +206,8 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent )
getPreferences();
/*
m_preferences->setBrowserVersion( "115.1.0" );
// m_preferences->setBrowserVersion( "102.2.3" );
slotLoadLanguage( "en-US" );
//slotLoadLanguage( "it" );
//slotLoadLanguage( "nl" );