mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-05-06 11:36:56 +02:00
CLeanup
This commit is contained in:
@@ -403,7 +403,7 @@ void Preferences::setNumberSize( int size )
|
||||
|
||||
|
||||
/*
|
||||
* Get the count type.
|
||||
* Get the number alignment.
|
||||
*/
|
||||
int Preferences::getNumberAlignment() const
|
||||
{
|
||||
@@ -412,7 +412,7 @@ int Preferences::getNumberAlignment() const
|
||||
|
||||
|
||||
/*
|
||||
* Set the count type.
|
||||
* Set the number alignment.
|
||||
*/
|
||||
void Preferences::setNumberAlignment( int alignment )
|
||||
{
|
||||
@@ -429,7 +429,7 @@ void Preferences::setNumberAlignment( int alignment )
|
||||
|
||||
|
||||
/*
|
||||
* Get the count type.
|
||||
* Get the number margins.
|
||||
*/
|
||||
QMargins Preferences::getNumberMargins() const
|
||||
{
|
||||
@@ -438,7 +438,7 @@ QMargins Preferences::getNumberMargins() const
|
||||
|
||||
|
||||
/*
|
||||
* Set the count type.
|
||||
* Set the number margins.
|
||||
*/
|
||||
void Preferences::setNumberMargins( QMargins margins )
|
||||
{
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
#include <QMimeDatabase>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QRegExpValidator>
|
||||
#include <QTextStream>
|
||||
|
||||
/*
|
||||
* Constructor
|
||||
@@ -400,7 +398,6 @@ void PreferencesDialog::slotAccept()
|
||||
m_pref->setCountType( static_cast< Preferences::CountType >( m_ui->countTypeGroup->checkedId() ) );
|
||||
|
||||
m_pref->setNumberAlignment( m_ui->numberAlignmentComboBox->currentIndex() );
|
||||
// m_pref->setNumberMargins( getNumberMargins() );
|
||||
m_pref->setNumberMargins( QMargins( m_ui->numberMarginLeftSpinBox->value(), m_ui->numberMarginTopSpinBox->value(),
|
||||
m_ui->numberMarginRightSpinBox->value(), m_ui->numberMarginBottomSpinBox->value() ) );
|
||||
|
||||
@@ -676,7 +673,7 @@ void PreferencesDialog::slotCountTypeChange()
|
||||
|
||||
|
||||
/*
|
||||
* Handle the number size change
|
||||
* Handle the number alignment change
|
||||
*/
|
||||
void PreferencesDialog::slotNumberAlignmentChange()
|
||||
{
|
||||
@@ -685,7 +682,7 @@ void PreferencesDialog::slotNumberAlignmentChange()
|
||||
|
||||
|
||||
/*
|
||||
* Handle the number size change
|
||||
* Handle the number margins change
|
||||
*/
|
||||
void PreferencesDialog::slotNumberMarginsChange()
|
||||
{
|
||||
|
||||
@@ -178,7 +178,7 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent )
|
||||
*/
|
||||
getPreferences();
|
||||
|
||||
///*
|
||||
/*
|
||||
slotLoadLanguage( "en-US" );
|
||||
//slotLoadLanguage( "it" );
|
||||
//slotLoadLanguage( "nl" );
|
||||
@@ -187,7 +187,7 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent )
|
||||
slotSelectIconObject( false );
|
||||
|
||||
slotSetUnreadMail( 10 );
|
||||
//*/
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ void SysTrayXIcon::setNumberAlignment( int alignment )
|
||||
|
||||
|
||||
/*
|
||||
* Set number alignment
|
||||
* Set number margins
|
||||
*/
|
||||
void SysTrayXIcon::setNumberMargins( QMargins margins )
|
||||
{
|
||||
|
||||
@@ -664,12 +664,12 @@ void SysTrayXLink::DecodePreferences( const QJsonObject& pref )
|
||||
|
||||
if( pref.contains( "numberAlignment" ) && pref[ "numberAlignment" ].isString() )
|
||||
{
|
||||
int number_size = pref[ "numberAlignment" ].toString().toInt();
|
||||
int number_alignment = pref[ "numberAlignment" ].toString().toInt();
|
||||
|
||||
/*
|
||||
* Store the new number size
|
||||
* Store the new number alignment
|
||||
*/
|
||||
m_pref->setNumberAlignment( number_size );
|
||||
m_pref->setNumberAlignment( number_alignment );
|
||||
}
|
||||
|
||||
if( pref.contains( "numberMargins" ) && pref[ "numberMargins" ].isObject() )
|
||||
|
||||
@@ -741,10 +741,14 @@ SysTrayX.RestoreOptions = {
|
||||
const inputTop = document.querySelector(`input[name="numberMarginTop"]`);
|
||||
inputTop.value = numberMargins.top;
|
||||
|
||||
const inputRight = document.querySelector(`input[name="numberMarginRight"]`);
|
||||
const inputRight = document.querySelector(
|
||||
`input[name="numberMarginRight"]`
|
||||
);
|
||||
inputRight.value = numberMargins.right;
|
||||
|
||||
const inputBottom = document.querySelector(`input[name="numberMarginBottom"]`);
|
||||
const inputBottom = document.querySelector(
|
||||
`input[name="numberMarginBottom"]`
|
||||
);
|
||||
inputBottom.value = numberMargins.bottom;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user