Skip to content
Snippets Groups Projects
Commit 90536f56 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm "native" stylesheet (#819); update CHANGELOG

parent a78f659c
No related branches found
No related tags found
No related merge requests found
Pipeline #118851 failed
......@@ -4,8 +4,8 @@ BornAgain-22.0, in preparation
* LambdaScan for time-of-flight offspec
* Datafield::flat flattens out axis of size 1
> API:
* Detector2D replaces RectangularDetector and SphericalDetector. Its nominal axes are equidistant
phi, alpha grids, but scattering is computed for the actual phi, alpha of each pixel.
* Detector2D replaces RectangularDetector and SphericalDetector. Nominal axes are equidistant,
but scattering is computed for the actual phi, alpha of each pixel.
* Offspec analyzer is set for detector, not scan(#651)
* FitObjective::addSimulationAndData has been replaced by function addFitPair,
which takes experimental data in form of a Datafield object instead of a NumPy array
......@@ -17,6 +17,7 @@ BornAgain-22.0, in preparation
* Simplified and unified some views
* In sample model, removed possibility to set lengths in angstrom instead of nm (#756)
* Removed unfinished undo/redo support (#757)
* Removed style option "native" (#819)
> Examples and documentation:
* New Transmission.py, prints transmission of a multilayer
> Bug fixes:
......
......@@ -36,7 +36,7 @@ const QString S_DEFAULT_UNIT_IS_ANGSTROM = "DefaultUnitIsAngstrom";
ApplicationSettings* appSettings; //!< global pointer to _the_ instance
ApplicationSettings::ApplicationSettings()
: m_currentStyle(ApplicationSettings::Style::native)
: m_currentStyle(ApplicationSettings::Style::light)
{
appSettings = this;
}
......@@ -62,7 +62,7 @@ void ApplicationSettings::setCreateNewProjectOnStartup(bool b)
ApplicationSettings::Style ApplicationSettings::styleToUse() const
{
return static_cast<Style>(QSettings().value(S_STYLE, static_cast<int>(Style::native)).toInt());
return static_cast<Style>(QSettings().value(S_STYLE, static_cast<int>(Style::light)).toInt());
}
void ApplicationSettings::setStyleToUse(Style style)
......@@ -132,29 +132,22 @@ void ApplicationSettings::loadWindowSizeAndPos(QWidget* w)
void ApplicationSettings::loadStyle(ApplicationSettings::Style style)
{
QString stylesheet;
QFile base(":/styles/Base.stylesheet");
base.open(QFile::ReadOnly);
QString stylesheet = base.readAll();
switch (style) {
case ApplicationSettings::Style::light: {
QFile base(":/styles/Base.stylesheet");
base.open(QFile::ReadOnly);
QFile light(":/styles/Light.stylesheet");
light.open(QFile::ReadOnly);
stylesheet = base.readAll() + light.readAll();
break;
}
case ApplicationSettings::Style::dark: {
QFile base(":/styles/Base.stylesheet");
base.open(QFile::ReadOnly);
QFile dark(":/styles/Dark.stylesheet");
dark.open(QFile::ReadOnly);
stylesheet = base.readAll() + dark.readAll();
stylesheet += dark.readAll();
break;
}
case ApplicationSettings::Style::light:
default: {
QFile native(":/styles/Native.stylesheet");
native.open(QFile::ReadOnly);
stylesheet = native.readAll();
QFile light(":/styles/Light.stylesheet");
light.open(QFile::ReadOnly);
stylesheet += light.readAll();
break;
}
}
......@@ -180,10 +173,6 @@ void ApplicationSettings::loadStyle(ApplicationSettings::Style style)
styleSheetPalette.setColor(QPalette::Dark, QColor(43, 50, 54).darker(120));
break;
}
default: {
styleSheetPalette = qApp->style()->standardPalette();
break;
}
}
QApplication::setPalette(styleSheetPalette);
qApp->setStyleSheet("");
......
......@@ -27,7 +27,7 @@ class QVariant;
//! contains settings which may be user editable in the future.
class ApplicationSettings {
public:
enum class Style { native, light, dark };
enum class Style { light, dark };
ApplicationSettings();
......
......@@ -74,6 +74,5 @@
<file>styles/Base.stylesheet</file>
<file>styles/Dark.stylesheet</file>
<file>styles/Light.stylesheet</file>
<file>styles/Native.stylesheet</file>
</qresource>
</RCC>
CompoundForm, LayerForm,MesocrystalForm,ParticleForm,CoreAndShellForm, ParticleLayoutForm{
border: 1px solid;
border-color: rgba(100, 100, 100, 10%);
}
/* Reset Margin From QGroupBox To 0px To Save Space In SampleView */
LayerForm {
margin-top:0px;
}
LayerForm QGroupBox{
border: 1px solid;
border-color: rgba(100, 100, 100, 25%);
}
ProjectsView{
background-color: #e6e6e6;
}
SampleView QGroupBox
{
border: 1px solid rgba(0, 0, 0,0%);
border-radius: 3px;
}
SampleView LayerOrientedSampleEditor QScrollArea LayerForm QLabel{
color: black;
}
SampleView LayerOrientedSampleEditor QScrollArea LayerForm QCheckBox{
color: black;
}
SampleView LayerOrientedSampleEditor QScrollArea LayerForm QToolButton{
color: black;
}
SampleView LayerOrientedSampleEditor QScrollArea LayerForm QPushButton{
color: black;
}
/* Set The Style For The Global SideBar */
QToolButton#ViewSelectionButton
{
border: none;
color: white; background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop : 0 #153b4c, stop : 1 #347a9c);
}
QToolButton#GroupBoxToggler
{
border: none;
text-align: left; font: bold;
padding: 5px
}
QToolButton#ViewSelectionButton:pressed
{
color: white; background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #97a8b0, stop: 1 #dae7ed);
}
QToolButton#ViewSelectionButton:hover
{
color: white; background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #254b5c, stop: 1 #448aac);
}
QToolButton#ViewSelectionButton:checked
{
color: white; background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop : 0 #2b899c, stop : 1 #2abdda);
}
QToolButton#ViewSelectionButton:disabled
{
color: dimgray; background-color: transparent;
border-right: 1px solid rgba(100,100,100,25%);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment