summaryrefslogtreecommitdiff
path: root/fluid/Fl_Widget_Type.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-04-19 14:30:47 +0200
committerMatthias Melcher <github@matthiasm.com>2024-04-19 14:30:59 +0200
commit2eb5d175fd46dbfd567a440774c362e8d3c67a90 (patch)
tree8a49009069c8489997f58bcff5ac049f3f652078 /fluid/Fl_Widget_Type.cxx
parent15d9a350bf715357dec12810dcfe51ba8defbd5d (diff)
FLUID: Create VisualStudio compatible long strings
Better labels on FLUDI image properties dialog Better documentation on image compression
Diffstat (limited to 'fluid/Fl_Widget_Type.cxx')
-rw-r--r--fluid/Fl_Widget_Type.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index 485cb8d8f..5864b6ab6 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -503,7 +503,7 @@ void compress_image_cb(Fl_Check_Button* b, void *v) {
if (v == LOAD) {
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
b->activate();
- b->value(current_widget->compress_image_);
+ b->value(!current_widget->compress_image_);
} else {
b->deactivate();
}
@@ -511,7 +511,7 @@ void compress_image_cb(Fl_Check_Button* b, void *v) {
int mod = 0;
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
if (o->selected && o->is_widget()) {
- ((Fl_Widget_Type*)o)->compress_image_ = b->value();
+ ((Fl_Widget_Type*)o)->compress_image_ = !b->value();
mod = 1;
}
}
@@ -585,7 +585,7 @@ void compress_deimage_cb(Fl_Check_Button* b, void *v) {
if (v == LOAD) {
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
b->activate();
- b->value(current_widget->compress_deimage_);
+ b->value(!current_widget->compress_deimage_);
} else {
b->deactivate();
}
@@ -593,7 +593,7 @@ void compress_deimage_cb(Fl_Check_Button* b, void *v) {
int mod = 0;
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
if (o->selected && o->is_widget()) {
- ((Fl_Widget_Type*)o)->compress_deimage_ = b->value();
+ ((Fl_Widget_Type*)o)->compress_deimage_ = !b->value();
mod = 1;
}
}
@@ -3432,6 +3432,7 @@ void Fl_Widget_Type::read_property(Fd_Project_Reader &f, const char *c) {
// the code below is for compatibility with older .fl files
const char *ext = fl_filename_ext(image_name_);
if ( strcmp(ext, ".jpg")
+ && strcmp(ext, ".png")
&& strcmp(ext, ".svg")
&& strcmp(ext, ".svgz"))
compress_image_ = 0; // if it is neither of those, default to uncompressed
@@ -3450,6 +3451,7 @@ void Fl_Widget_Type::read_property(Fd_Project_Reader &f, const char *c) {
// the code below is for compatibility with older .fl files
const char *ext = fl_filename_ext(inactive_name_);
if ( strcmp(ext, ".jpg")
+ && strcmp(ext, ".png")
&& strcmp(ext, ".svg")
&& strcmp(ext, ".svgz"))
compress_deimage_ = 0; // if it is neither of those, default to uncompressed