Skip to content

Commit

Permalink
debugging issue with colour picker (#2422)
Browse files Browse the repository at this point in the history
  • Loading branch information
giuspen committed Jan 9, 2024
1 parent 4862eb4 commit 9649509
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ct/ct_dialogs_gen_purp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,20 @@ CtDialogs::CtPickDlgState CtDialogs::colour_pick_dialog(CtMainWin* pCtMainWin,
if (allow_remove_colour) {
dialog.add_button(_("Remove Color"), Gtk::RESPONSE_NONE);
}
// from gtk3 branch gtk-3-24 file gtk/gtk/gtkcolorchooserwidget.c function add_default_palette
const gchar* default_colors[45]{
"#99c1f1", "#62a0ea", "#3584e4", "#1c71d8", "#1a5fb4", /* Blue */
"#8ff0a4", "#57e389", "#33d17a", "#2ec27e", "#26a269", /* Green */
"#f9f06b", "#f8e45c", "#f6d32d", "#f5c211", "#e5a50a", /* Yellow */
"#ffbe6f", "#ffa348", "#ff7800", "#e66100", "#c64600", /* Orange */
"#f66151", "#ed333b", "#e01b24", "#c01c28", "#a51d2d", /* Red */
"#dc8add", "#c061cb", "#9141ac", "#813d9c", "#613583", /* Purple */
"#cdab8f", "#b5835a", "#986a44", "#865e3c", "#63452c", /* Brown */
"#ffffff", "#f6f5f4", "#deddda", "#c0bfbc", "#9a9996", /* Light */
"#77767b", "#5e5c64", "#3d3846", "#241f31", "#000000"};/* Dark */
std::vector<Gdk::RGBA> default_colours;
for (int i=0; i<45; ++i) { default_colours.push_back(Gdk::RGBA{default_colors[i]}); }
dialog.add_palette(Gtk::Orientation::ORIENTATION_VERTICAL, 5, default_colours);
dialog.set_rgba(Gdk::RGBA(ret_colour));

auto on_key_press_dialog = [&](GdkEventKey* pEventKey)->bool{
Expand Down

0 comments on commit 9649509

Please sign in to comment.