summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-28 10:48:29 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-28 10:48:29 -0700
commitbe47ce624170cfce7e9763e5530f0be3555c187d (patch)
tree32bbcff75998e9187cb7d0969e6dfa2a740e16a5 /qt-ui
parent921041163be940d22ecffa5dc544add97c0bc0e1 (diff)
downloadsubsurface-be47ce624170cfce7e9763e5530f0be3555c187d.tar.gz
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>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/printdialog.cpp14
-rw-r--r--qt-ui/printoptions.h3
-rw-r--r--qt-ui/templateedit.cpp6
-rw-r--r--qt-ui/templateedit.ui5
4 files changed, 24 insertions, 4 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index 25c102201..6c50ae99b 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -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;
diff --git a/qt-ui/printoptions.h b/qt-ui/printoptions.h
index 2e2e2a9f4..4903da09f 100644
--- a/qt-ui/printoptions.h
+++ b/qt-ui/printoptions.h
@@ -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
diff --git a/qt-ui/templateedit.cpp b/qt-ui/templateedit.cpp
index 6df11ea79..94ed276b5 100644
--- a/qt-ui/templateedit.cpp
+++ b/qt-ui/templateedit.cpp
@@ -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;
diff --git a/qt-ui/templateedit.ui b/qt-ui/templateedit.ui
index 1442954cf..238e69290 100644
--- a/qt-ui/templateedit.ui
+++ b/qt-ui/templateedit.ui
@@ -170,6 +170,11 @@
<widget class="QComboBox" name="colorpalette">
<item>
<property name="text">
+ <string>Default</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
<string>Almond</string>
</property>
</item>