corrected/changed settings initialisation of grid parameters

preferencesAboutTextFull
Clément Fauconnier 7 years ago
parent 4ca97d5c82
commit ad4eec200c
  1. 4
      resources/etc/OpenBoard.config
  2. 20
      src/core/UBPreferencesController.cpp
  3. 6
      src/core/UBSettings.cpp

@ -25,13 +25,13 @@ UseSystemOnScreenKeyboard=true
[Board]
AutoSaveIntervalInMinutes=3
CrossColorDarkBackground=#C82C2C2C
CrossColorDarkBackground=#C8C0C0C0
CrossColorLightBackground=#A5E1FF
DarkBackground=0
DefaultPageSize=@Size(1280 960)
EraserCircleWidthIndex=1
FeatureSliderPosition=40
GridDarkBackgroundColors=#FFFFFF, #FF3400, #66C0FF, #81FF5C, #FFFF00, #B68360, #FF497E, #8D69FF, #C82C2C2C
GridDarkBackgroundColors=#FFFFFF, #FF3400, #66C0FF, #81FF5C, #FFFF00, #B68360, #FF497E, #8D69FF, #C8C0C0C0
GridLightBackgroundColors=#000000, #FF0000, #004080, #008000, #FFDD00, #C87400, #800040, #008080, #5F2D0A, #A5E1FF
InterpolateMarkerStrokes=true
InterpolatePenStrokes=true

@ -100,10 +100,6 @@ UBPreferencesController::~UBPreferencesController()
delete mPenProperties;
delete mMarkerProperties;
delete mDarkBackgroundGridColorPicker;
delete mLightBackgroundGridColorPicker;
}
void UBPreferencesController::adjustScreens(int screen)
@ -158,6 +154,21 @@ void UBPreferencesController::wire()
//grid tab
//On light background
QPalette lightBackgroundPalette = QApplication::palette();
lightBackgroundPalette.setColor(QPalette::Window, Qt::white);
mPreferencesUI->crossColorLightBackgroundFrame->setAutoFillBackground(true);
mPreferencesUI->crossColorLightBackgroundFrame->setPalette(lightBackgroundPalette);
QPalette darkBackgroundPalette = QApplication::palette();
darkBackgroundPalette.setColor(QPalette::Window, Qt::black);
darkBackgroundPalette.setColor(QPalette::ButtonText, Qt::white);
darkBackgroundPalette.setColor(QPalette::WindowText, Qt::white);
mPreferencesUI->crossColorDarkBackgroundFrame->setAutoFillBackground(true);
mPreferencesUI->crossColorDarkBackgroundFrame->setPalette(darkBackgroundPalette);
mPreferencesUI->crossColorDarkBackgroundLabel->setPalette(darkBackgroundPalette);
QList<QColor> gridLightBackgroundColors = settings->boardGridLightBackgroundColors->colors();
QColor selectedCrossColorLightBackground(settings->boardCrossColorLightBackground->get().toString());
@ -381,7 +392,6 @@ void UBPreferencesController::defaultSettings()
mPreferencesUI->webHomePage->setText(settings->webHomePage->reset().toString());
}
}
void UBPreferencesController::darkBackgroundCrossOpacityValueChanged(int value)

@ -286,15 +286,15 @@ void UBSettings::init()
pageSize = new UBSetting(this, "Board", "DefaultPageSize", documentSizes.value(DocumentSizeRatio::Ratio4_3));
boardCrossColorDarkBackground = new UBSetting(this, "Board", "CrossColorDarkBackground", "#C82C2C2C");
boardCrossColorDarkBackground = new UBSetting(this, "Board", "CrossColorDarkBackground", "#C8C0C0C0");
boardCrossColorLightBackground = new UBSetting(this, "Board", "CrossColorLightBackground", "#A5E1FF");
QStringList gridLightBackgroundColors;
gridLightBackgroundColors << "#FFFFFF" << "#FF3400" << "#66C0FF" << "#81FF5C" << "#FFFF00" << "#B68360" << "#FF497E" << "#8D69FF" << "#C82C2C2C";
gridLightBackgroundColors << "#000000" << "#FF0000" << "#004080" << "#008000" << "#FFDD00" << "#C87400" << "#800040" << "#008080" << "#A5E1FF";
boardGridLightBackgroundColors = new UBColorListSetting(this, "Board", "GridLightBackgroundColors", gridLightBackgroundColors, -1.0);
QStringList gridDarkBackgroundColors;
gridDarkBackgroundColors << "#000000" << "#FF0000" << "#004080" << "#008000" << "#FFDD00" << "#C87400" << "#800040" << "#008080" << "#A5E1FF";
gridDarkBackgroundColors << "#FFFFFF" << "#FF3400" << "#66C0FF" << "#81FF5C" << "#FFFF00" << "#B68360" << "#FF497E" << "#8D69FF" << "#C8C0C0C0";
boardGridDarkBackgroundColors = new UBColorListSetting(this, "Board", "GridDarkBackgroundColors", gridDarkBackgroundColors, -1.0);
QStringList penLightBackgroundColors;

Loading…
Cancel
Save