X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fwx_util.h;h=06e3eda0f1b447d090c7d6350c55463a3b928f2a;hb=b9a1ad3df5f9d85fb7439efd93fede72b9b078af;hp=1c459595e20ebcdc7a91247868a873cac480e54b;hpb=8963f0007af1a312017b9627c18b82ec2a577591;p=dcpomatic.git diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h index 1c459595e..06e3eda0f 100644 --- a/src/wx/wx_util.h +++ b/src/wx/wx_util.h @@ -31,11 +31,11 @@ #include "lib/dcpomatic_time.h" #include "lib/warnings.h" DCPOMATIC_DISABLE_WARNINGS +#include #include DCPOMATIC_ENABLE_WARNINGS -#include -#include #include +#include class FilePickerCtrl; @@ -51,6 +51,27 @@ class PasswordEntry; #define DCPOMATIC_SIZER_Y_GAP 8 #define DCPOMATIC_SIZER_GAP 8 #define DCPOMATIC_DIALOG_BORDER 12 +#ifdef __WXGTK3__ +#define DCPOMATIC_SPIN_CTRL_WIDTH 118 +#else +#define DCPOMATIC_SPIN_CTRL_WIDTH 56 +#endif + +/** Amount by which you need to bottom-pad text next to a checkbox in order + * for the text baselines to be aligned. + */ +#ifdef DCPOMATIC_OSX +#define DCPOMATIC_CHECKBOX_BOTTOM_PAD 2 +#else +#define DCPOMATIC_CHECKBOX_BOTTOM_PAD 0 +#endif + +/** Amount by which you need to top-pad a choice to make it line up, in some cases */ +#ifdef DCPOMATIC_OSX +#define DCPOMATIC_CHOICE_TOP_PAD 1 +#else +#define DCPOMATIC_CHOICE_TOP_PAD 0 +#endif /** Spacing to use between buttons in a vertical/horizontal line */ #if defined(DCPOMATIC_OSX) || defined(__WXGTK3__) @@ -98,6 +119,9 @@ extern bool display_progress (wxString title, wxString task); extern bool report_errors_from_last_job (wxWindow* parent); extern wxString bitmap_path (std::string name); extern wxSize small_button_size (wxWindow* parent, wxString text); +extern bool gui_is_dark (); +extern double dpi_scale_factor (wxWindow* window); +extern int search_ctrl_height (); struct Offset @@ -135,7 +159,7 @@ extern int wx_get (wxChoice* widget); extern int wx_get (wxSpinCtrl* widget); extern double wx_get (wxSpinCtrlDouble* widget); -#if defined(__WXMSW__) +#ifdef DCPOMATIC_WINDOWS #define DCPOMATIC_USE_OWN_PICKER #endif