Gimp/app/config/config-enums.h
Jehan c32e803679 app, themes: merge the Gray and Default themes and add theme color scheme concept.
Until now, we were following a similar concept of color schemes as what most OS
are doing. For instance, Freedesktop recently introduced a tri-state color
scheme of "Prefer Light", "Prefer Dark" and "Default", the latter being either
whatever the software prefers (e.g. we prefer either Dark or Gray for graphics
software usually) or what the system prefers. See #8675.

Until now, with GTK, we only had a boolean "prefer dark" setting through the
"gtk-application-prefer-dark-theme" settings. There is not even a "prefer
light".

Nevertheless for graphics application, there is clearly a third case (fourth if
we added a "follow system color preferences" which we don't implement for now):
gray mode and in particular middle gray. Having a middle gray UI is often
considered a necessity when working on colors in order to protect our perception
of color from being influenced by surrounding UI.
To fill this need, we were proposing a Default vs. a Gray theme in GIMP, but
this was a bit confusing and felt illogical, as discussed on IRC some time ago.
Also depending on whether you chose "prefer dark" or not for the gray theme,
this one was itself 2 themes, which made things odd and harder to work on.

Instead this commit:

- adds a color scheme concept in GIMP with 3 variants so far: light, gray and
  dark. A possible fourth (future) variant might be to follow the system
  preference (do all OS provide such a queriable option?).
- Our Gray theme is merged into Default (as the gray color scheme variant).
- Custom themes can add the following CSS files: gimp-light.css, gimp-gray.css,
  gimp-dark.css which are the base file for their respective scheme. gimp.css is
  still used as a fallback though it is not necessary (our own Default theme
  does not provide a gimp.css anymore). Custom themes don't have to provide all
  3 variants. A theme can just provide one or 2 variants if it only wants to
  support 1 or 2 use cases.
2024-01-25 18:56:13 +01:00

182 lines
5.5 KiB
C

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CONFIG_ENUMS_H__
#define __CONFIG_ENUMS_H__
#define GIMP_TYPE_CANVAS_PADDING_MODE (gimp_canvas_padding_mode_get_type ())
GType gimp_canvas_padding_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_CANVAS_PADDING_MODE_DEFAULT, /*< desc="From theme" >*/
GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, /*< desc="Light check color" >*/
GIMP_CANVAS_PADDING_MODE_DARK_CHECK, /*< desc="Dark check color" >*/
GIMP_CANVAS_PADDING_MODE_CUSTOM, /*< desc="Custom color" >*/
GIMP_CANVAS_PADDING_MODE_RESET = -1 /*< skip >*/
} GimpCanvasPaddingMode;
#define GIMP_TYPE_CURSOR_FORMAT (gimp_cursor_format_get_type ())
GType gimp_cursor_format_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_CURSOR_FORMAT_BITMAP, /*< desc="Black & white" >*/
GIMP_CURSOR_FORMAT_PIXBUF /*< desc="Fancy" >*/
} GimpCursorFormat;
#define GIMP_TYPE_CURSOR_MODE (gimp_cursor_mode_get_type ())
GType gimp_cursor_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_CURSOR_MODE_TOOL_ICON, /*< desc="Tool icon" >*/
GIMP_CURSOR_MODE_TOOL_CROSSHAIR, /*< desc="Tool icon with crosshair" >*/
GIMP_CURSOR_MODE_CROSSHAIR, /*< desc="Crosshair only" >*/
} GimpCursorMode;
#define GIMP_TYPE_EXPORT_FILE_TYPE (gimp_export_file_type_get_type ())
GType gimp_export_file_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_EXPORT_FILE_PNG, /*< desc="PNG Image" >*/
GIMP_EXPORT_FILE_JPG, /*< desc="JPEG Image" >*/
GIMP_EXPORT_FILE_ORA, /*< desc="OpenRaster Image" >*/
GIMP_EXPORT_FILE_PSD, /*< desc="Photoshop Image" >*/
GIMP_EXPORT_FILE_PDF, /*< desc="Portable Document Format" >*/
GIMP_EXPORT_FILE_TIF, /*< desc="TIFF Image" >*/
GIMP_EXPORT_FILE_BMP, /*< desc="Windows BMP Image" >*/
GIMP_EXPORT_FILE_WEBP, /*< desc="WebP Image" >*/
} GimpExportFileType;
#define GIMP_TYPE_HANDEDNESS (gimp_handedness_get_type ())
GType gimp_handedness_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_HANDEDNESS_LEFT, /*< desc="Left-handed" >*/
GIMP_HANDEDNESS_RIGHT /*< desc="Right-handed" >*/
} GimpHandedness;
#define GIMP_TYPE_HELP_BROWSER_TYPE (gimp_help_browser_type_get_type ())
GType gimp_help_browser_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_HELP_BROWSER_GIMP, /*< desc="GIMP help browser" >*/
GIMP_HELP_BROWSER_WEB_BROWSER /*< desc="Web browser" >*/
} GimpHelpBrowserType;
#define GIMP_TYPE_ICON_SIZE (gimp_icon_size_get_type ())
GType gimp_icon_size_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_ICON_SIZE_SMALL, /*< desc="Small size" > */
GIMP_ICON_SIZE_MEDIUM, /*< desc="Medium size" > */
GIMP_ICON_SIZE_LARGE, /*< desc="Large size" > */
GIMP_ICON_SIZE_HUGE /*< desc="Huge size" > */
} GimpIconSize;
#define GIMP_TYPE_POSITION (gimp_position_get_type ())
GType gimp_position_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_POSITION_TOP, /*< desc="Top" >*/
GIMP_POSITION_BOTTOM, /*< desc="Bottom" >*/
GIMP_POSITION_LEFT, /*< desc="Left" >*/
GIMP_POSITION_RIGHT /*< desc="Right" >*/
} GimpPosition;
#define GIMP_TYPE_DRAG_ZOOM_MODE (gimp_drag_zoom_mode_get_type ())
GType gimp_drag_zoom_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
PROP_DRAG_ZOOM_MODE_DISTANCE, /*< desc="By distance" >*/
PROP_DRAG_ZOOM_MODE_DURATION, /*< desc="By duration" >*/
} GimpDragZoomMode;
#define GIMP_TYPE_SPACE_BAR_ACTION (gimp_space_bar_action_get_type ())
GType gimp_space_bar_action_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_SPACE_BAR_ACTION_NONE, /*< desc="No action" >*/
GIMP_SPACE_BAR_ACTION_PAN, /*< desc="Pan view" >*/
GIMP_SPACE_BAR_ACTION_MOVE /*< desc="Switch to Move tool" >*/
} GimpSpaceBarAction;
#define GIMP_TYPE_WINDOW_HINT (gimp_window_hint_get_type ())
GType gimp_window_hint_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_WINDOW_HINT_NORMAL, /*< desc="Normal window" >*/
GIMP_WINDOW_HINT_UTILITY, /*< desc="Utility window" >*/
GIMP_WINDOW_HINT_KEEP_ABOVE /*< desc="Keep above" >*/
} GimpWindowHint;
#define GIMP_TYPE_ZOOM_QUALITY (gimp_zoom_quality_get_type ())
GType gimp_zoom_quality_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_ZOOM_QUALITY_LOW, /*< desc="Low" >*/
GIMP_ZOOM_QUALITY_HIGH /*< desc="High" >*/
} GimpZoomQuality;
#define GIMP_TYPE_THEME_SCHEME (gimp_theme_scheme_get_type ())
GType gimp_theme_scheme_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_THEME_LIGHT, /*< desc="Light Colors" >*/
GIMP_THEME_GRAY, /*< desc="Middle Gray" >*/
GIMP_THEME_DARK, /*< desc="Dark Colors" >*/
/* TODO: it might be interesting eventually to add a GIMP_THEME_SYSTEM
* following up the system-wide color scheme preference. See #8675.
*/
} GimpThemeScheme;
#endif /* __CONFIG_ENUMS_H__ */