Skip to content

Commit

Permalink
Qtize rgbcolors. (#1356)
Browse files Browse the repository at this point in the history
* Qtize rgbcolors.

* use big stick to validate hex color codes
  • Loading branch information
tsteven4 authored Oct 22, 2024
1 parent 4fc7821 commit 5c10313
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 195 deletions.
2 changes: 1 addition & 1 deletion defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ int parse_speed(const QString& str, double* val, double scale, const char* modul
/*
* Color helpers.
*/
int color_to_bbggrr(const char* cname);
int color_to_bbggrr(const QString& cname);

/*
* A constant for unknown altitude. It's tempting to just use zero
Expand Down
4 changes: 2 additions & 2 deletions ozi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ OziFormat::ozi_alloc_fsdata()
auto* fsdata = new ozi_fsdata;

/* Provide defaults via command line defaults */
fsdata->fgcolor = color_to_bbggrr(wptfgcolor);
fsdata->bgcolor = color_to_bbggrr(wptbgcolor);
fsdata->fgcolor = color_to_bbggrr(wptfgcolor.get());
fsdata->bgcolor = color_to_bbggrr(wptbgcolor.get());

return fsdata;
}
Expand Down
Loading

0 comments on commit 5c10313

Please sign in to comment.