mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Printing: show colors in edit tab
- Add default color struct - Init the color struct with default colors - Show color text in labels - Preview colors Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
dcedc8ebea
commit
ad531c25fb
3 changed files with 44 additions and 2 deletions
|
@ -26,13 +26,30 @@ struct template_options {
|
|||
int color_palette_index;
|
||||
double font_size;
|
||||
double line_spacing;
|
||||
struct color_palette_struct {
|
||||
QColor color1;
|
||||
QColor color2;
|
||||
QColor color3;
|
||||
QColor color4;
|
||||
QColor color5;
|
||||
bool operator!=(const color_palette_struct &other) const {
|
||||
return other.color1 != color1
|
||||
|| other.color2 != color2
|
||||
|| other.color3 != color3
|
||||
|| other.color4 != color4
|
||||
|| other.color5 != color5;
|
||||
}
|
||||
} color_palette;
|
||||
bool operator!=(const template_options &other) const {
|
||||
return other.font_index != font_index
|
||||
|| other.color_palette_index != color_palette_index
|
||||
|| other.font_size != font_size
|
||||
|| other.line_spacing != line_spacing;
|
||||
|| other.line_spacing != line_spacing
|
||||
|| other.color_palette != color_palette;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
extern template_options::color_palette_struct almond_colors;
|
||||
|
||||
// should be based on a custom QPrintDialog class
|
||||
class PrintOptions : public QWidget {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue