mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:23:24 +00:00
Printing: add new default color scheme
This is based on the Subusrface logo colors, keeping the hue and modifying the saturation and value in order to get what to me looks like a fairly pleasant color setup. This is an attempt to come up with a good default. By all means, this is supposed to be a starting point to make it better, not a decision on what the colors should be. I would however claim that they are better than the previously available options :-) I like the idea of basing this on our existing colors - but even that is up for modification if someone has a better proposal. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
921041163b
commit
be47ce6241
4 changed files with 24 additions and 4 deletions
|
@ -12,11 +12,16 @@
|
|||
|
||||
#define SETTINGS_GROUP "PrintDialog"
|
||||
|
||||
template_options::color_palette_struct almond_colors, blueshades_colors, custom_colors;
|
||||
template_options::color_palette_struct ssrf_colors, almond_colors, blueshades_colors, custom_colors;
|
||||
|
||||
PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
|
||||
{
|
||||
// initialize const colors
|
||||
ssrf_colors.color1 = QColor::fromRgb(0xef, 0xf7, 0xff);
|
||||
ssrf_colors.color2 = QColor::fromRgb(0xa6, 0xbc, 0xd7);
|
||||
ssrf_colors.color3 = QColor::fromRgb(0x34, 0x65, 0xa4);
|
||||
ssrf_colors.color4 = QColor::fromRgb(0x20, 0x4a, 0x87);
|
||||
ssrf_colors.color5 = QColor::fromRgb(0x17, 0x37, 0x64);
|
||||
almond_colors.color1 = QColor::fromRgb(243, 234, 207);
|
||||
almond_colors.color2 = QColor::fromRgb(253, 204, 156);
|
||||
almond_colors.color3 = QColor::fromRgb(136, 160, 150);
|
||||
|
@ -39,9 +44,9 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
|
|||
printOptions.type = print_options::DIVELIST;
|
||||
templateOptions.font_index = 0;
|
||||
templateOptions.font_size = 9;
|
||||
templateOptions.color_palette_index = ALMOND;
|
||||
templateOptions.color_palette_index = SSRF_COLORS;
|
||||
templateOptions.line_spacing = 1;
|
||||
custom_colors = almond_colors;
|
||||
custom_colors = ssrf_colors;
|
||||
} else {
|
||||
s.beginGroup(SETTINGS_GROUP);
|
||||
printOptions.type = (print_options::print_type)s.value("type").toInt();
|
||||
|
@ -70,6 +75,9 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
|
|||
}
|
||||
|
||||
switch (templateOptions.color_palette_index) {
|
||||
case SSRF_COLORS: // default Subsurface derived colors
|
||||
templateOptions.color_palette = ssrf_colors;
|
||||
break;
|
||||
case ALMOND: // almond
|
||||
templateOptions.color_palette = almond_colors;
|
||||
break;
|
||||
|
|
|
@ -44,9 +44,10 @@ struct template_options {
|
|||
}
|
||||
};
|
||||
|
||||
extern template_options::color_palette_struct almond_colors, blueshades_colors, custom_colors;
|
||||
extern template_options::color_palette_struct ssrf_colors, almond_colors, blueshades_colors, custom_colors;
|
||||
|
||||
enum color_palette {
|
||||
SSRF_COLORS,
|
||||
ALMOND,
|
||||
BLUESHADES,
|
||||
CUSTOM
|
||||
|
|
|
@ -92,6 +92,9 @@ void TemplateEdit::on_colorpalette_currentIndexChanged(int index)
|
|||
{
|
||||
newTemplateOptions.color_palette_index = index;
|
||||
switch (newTemplateOptions.color_palette_index) {
|
||||
case SSRF_COLORS: // subsurface derived default colors
|
||||
newTemplateOptions.color_palette = ssrf_colors;
|
||||
break;
|
||||
case ALMOND: // almond
|
||||
newTemplateOptions.color_palette = almond_colors;
|
||||
break;
|
||||
|
@ -147,6 +150,9 @@ void TemplateEdit::colorSelect(QAbstractButton *button)
|
|||
{
|
||||
// reset custom colors palette
|
||||
switch (newTemplateOptions.color_palette_index) {
|
||||
case SSRF_COLORS: // subsurface derived default colors
|
||||
newTemplateOptions.color_palette = ssrf_colors;
|
||||
break;
|
||||
case ALMOND: // almond
|
||||
newTemplateOptions.color_palette = almond_colors;
|
||||
custom_colors = newTemplateOptions.color_palette;
|
||||
|
|
|
@ -168,6 +168,11 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="colorpalette">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Default</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Almond</string>
|
||||
|
|
Loading…
Add table
Reference in a new issue