back by popular demand: load mode icons, tweak shapewipe layout
authorGood Guy <good1.2guy@gmail.com>
Tue, 8 Oct 2019 16:00:28 +0000 (10:00 -0600)
committerGood Guy <good1.2guy@gmail.com>
Tue, 8 Oct 2019 16:00:28 +0000 (10:00 -0600)
14 files changed:
cinelerra-5.1/cinelerra/loadfile.C
cinelerra-5.1/cinelerra/loadmode.C
cinelerra-5.1/cinelerra/loadmode.h
cinelerra-5.1/cinelerra/loadmode.inc
cinelerra-5.1/cinelerra/menueffects.C
cinelerra-5.1/cinelerra/recordgui.C
cinelerra-5.1/cinelerra/render.C
cinelerra-5.1/guicast/bcfilebox.C
cinelerra-5.1/guicast/bcfilebox.h
cinelerra-5.1/guicast/bclistbox.C
cinelerra-5.1/plugins/shapewipe/shapewipe.C
cinelerra-5.1/plugins/shapewipe/shapewipe.h
cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C
cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C

index fff3b625c2f8021cf065943c21b8d82fecf57f25..c65a9a28531df854f1a08c2025fe91e696b4ce54 100644 (file)
@@ -183,11 +183,9 @@ void LoadFileWindow::create_objects()
        lock_window("LoadFileWindow::create_objects");
        BC_FileBox::create_objects();
 
-       int x = get_w() / 2 -
-               LoadMode::calculate_w(this, mwindow->theme) / 2;
-       int y = get_cancel_button()->get_y() -
-               LoadMode::calculate_h(this, mwindow->theme);
-       loadmode = new LoadMode(mwindow, this, x, y, &thread->load_mode, 0);
+       int x = get_w() / 2 - LoadMode::calculate_w(this, mwindow->theme) / 2;
+       int y = get_y_margin();
+       loadmode = new LoadMode(mwindow, this, x, y, &thread->load_mode, 0, 1);
        loadmode->create_objects();
        add_subwindow(load_file_apply = new LoadFileApply(this));
 
@@ -199,16 +197,15 @@ void LoadFileWindow::create_objects()
 int LoadFileWindow::resize_event(int w, int h)
 {
        draw_background(0, 0, w, h);
-       int x = w / 2 - 200;
-       int y = get_cancel_button()->get_y() -
-               LoadMode::calculate_h(this, mwindow->theme);
+       BC_FileBox::resize_event(w, h);
+       int x = w / 2 - LoadMode::calculate_w(this, mwindow->theme) / 2;
+       int y = get_y_margin();
        loadmode->reposition_window(x, y);
-
        x = (w - BC_GenericButton::calculate_w(this, _("Apply")))/2;
        y = h - BC_GenericButton::calculate_h() - 15;
        load_file_apply->reposition_window(x, y);
-
-       return BC_FileBox::resize_event(w, h);
+       flush();
+       return 1;
 }
 
 
index b32292ea0118c5c9b7cd617893be208875653c8d..04b35ee60451ac9e6a954104e4c49cf97eb78e67 100644 (file)
 #include "mwindow.h"
 #include "theme.h"
 
-
 // Must match macros
+static const char *mode_images[] =
+{
+       "loadmode_none",
+       "loadmode_new",
+       "loadmode_newcat",
+       "loadmode_newtracks",
+       "loadmode_cat",
+       "loadmode_paste",
+       "loadmode_resource",
+       "loadmode_nested"
+};
+
 static const char *mode_text[] =
 {
        N_("Insert nothing"),
@@ -47,8 +58,28 @@ LoadModeItem::LoadModeItem(const char *text, int value)
 }
 
 
-LoadMode::LoadMode(MWindow *mwindow, BC_WindowBase *window,
-       int x, int y, int *output, int use_nothing)
+LoadModeToggle::LoadModeToggle(int x, int y, LoadMode *window,
+               int value, const char *images, const char *tooltip)
+ : BC_Toggle(x, y, window->mwindow->theme->get_image_set(images),
+               *window->output == value)
+{
+       this->window = window;
+       this->value = value;
+       set_tooltip(tooltip);
+}
+
+int LoadModeToggle::handle_event()
+{
+       *window->output = value;
+       window->update();
+       return 1;
+}
+
+
+
+LoadMode::LoadMode(MWindow *mwindow,
+               BC_WindowBase *window, int x, int y, int *output,
+               int use_nothing, int use_nested, int line_wrap)
 {
        this->mwindow = mwindow;
        this->window = window;
@@ -56,11 +87,9 @@ LoadMode::LoadMode(MWindow *mwindow, BC_WindowBase *window,
        this->y = y;
        this->output = output;
        this->use_nothing = use_nothing;
-       int mode = LOADMODE_NOTHING;
-       if(use_nothing)
-               load_modes.append(new LoadModeItem(_(mode_text[mode]), mode));
-       while( ++mode < TOTAL_LOADMODES )
-               load_modes.append(new LoadModeItem(_(mode_text[mode]), mode));
+       this->use_nested = use_nested;
+       this->line_wrap = line_wrap;
+       for( int i=0; i<TOTAL_LOADMODES; ++i ) mode[i] = 0;
 }
 
 LoadMode::~LoadMode()
@@ -68,52 +97,148 @@ LoadMode::~LoadMode()
        delete title;
        delete textbox;
        delete listbox;
-       for(int i = 0; i < load_modes.total; i++)
-               delete load_modes.values[i];
+       load_modes.remove_all_objects();
+       for( int i=0; i<TOTAL_LOADMODES; ++i ) delete mode[i];
+}
+
+const char *LoadMode::mode_to_text()
+{
+       for( int i=0; i<load_modes.total; ++i ) {
+               if( load_modes[i]->value == *output )
+                       return load_modes[i]->get_text();
+       }
+       return _("Unknown");
+}
+
+void LoadMode::load_mode_geometry(BC_WindowBase *gui, Theme *theme,
+               int use_nothing, int use_nested, int line_wrap,
+               int *pw, int *ph)
+{
+       int pad = 5;
+       const char *title_text = _("Insertion strategy:");
+       int mw = BC_Title::calculate_w(gui, title_text);
+       int mh = BC_Title::calculate_h(gui, title_text);
+       int ix = mw + 2*pad, iy = 0, x1 = ix;
+       int ww = theme->loadmode_w + 24;
+       if( mw < ww ) mw = ww;
+
+       for( int i=0; i<TOTAL_LOADMODES; ++i ) {
+               if( i == LOADMODE_NOTHING && !use_nothing) continue;
+               if( i == LOADMODE_NESTED && !use_nested) continue;
+               int text_line, w, h, toggle_x, toggle_y;
+               int text_x, text_y, text_w, text_h;
+               BC_Toggle::calculate_extents(gui,
+                       theme->get_image_set(mode_images[i]), 0,
+                       &text_line, &w, &h, &toggle_x, &toggle_y,
+                       &text_x, &text_y, &text_w, &text_h, 0, MEDIUMFONT);
+               if( line_wrap && ix+w > ww ) { ix = x1;  iy += h+pad; }
+               if( (ix+=w) > mw ) mw = ix;
+               if( (h+=iy) > mh ) mh = h;
+               ix += pad;
+       }
+
+       ix = 0;  iy = mh+pad;
+       mh = iy + BC_TextBox::calculate_h(gui, MEDIUMFONT, 1, 1);
+       if( pw ) *pw = mw;
+       if( ph ) *ph = mh;
 }
 
-int LoadMode::calculate_w(BC_WindowBase *gui, Theme *theme)
+int LoadMode::calculate_w(BC_WindowBase *gui, Theme *theme,
+               int use_nothing, int use_nested, int line_wrap)
 {
-       return theme->loadmode_w + 24;
+       int result = 0;
+       load_mode_geometry(gui, theme, use_nothing, use_nested, line_wrap,
+                       &result, 0);
+       return result;
 }
 
-int LoadMode::calculate_h(BC_WindowBase *gui, Theme *theme)
+int LoadMode::calculate_h(BC_WindowBase *gui, Theme *theme,
+               int use_nothing, int use_nested, int line_wrap)
 {
-       return BC_Title::calculate_h(gui, _("Insertion strategy:"), MEDIUMFONT) +
-               BC_TextBox::calculate_h(gui, MEDIUMFONT, 1, 1);
+       int result = 0;
+       load_mode_geometry(gui, theme, use_nothing, use_nested, line_wrap,
+                       0, &result);
+       return result;
 }
 
-char* LoadMode::mode_to_text()
+void LoadMode::create_objects()
 {
-       for(int i = 0; i < load_modes.total; i++)
-       {
-               if(load_modes.values[i]->value == *output)
-                       return load_modes.values[i]->get_text();
+       int pad = 5;
+       const char *title_text = _("Insertion strategy:");
+       window->add_subwindow(title = new BC_Title(x, y, title_text));
+       int mw = title->get_w(), mh = title->get_h();
+       int ix = mw + 2*pad, iy = 0, x1 = ix;
+       int ww = mwindow->theme->loadmode_w + 24;
+       if( mw < ww ) mw = ww;
+
+       for( int i=0; i<TOTAL_LOADMODES; ++i ) {
+               if( i == LOADMODE_NOTHING && !use_nothing) continue;
+               if( i == LOADMODE_NESTED && !use_nested) continue;
+               load_modes.append(new LoadModeItem(_(mode_text[i]), i));
+               int text_line, w, h, toggle_x, toggle_y;
+               int text_x, text_y, text_w, text_h;
+               BC_Toggle::calculate_extents(window,
+                       mwindow->theme->get_image_set(mode_images[i]), 0,
+                       &text_line, &w, &h, &toggle_x, &toggle_y,
+                       &text_x, &text_y, &text_w, &text_h, 0, MEDIUMFONT);
+               if( line_wrap && ix+w > ww ) { ix = x1;  iy += h+pad; }
+               mode[i] = new LoadModeToggle(x+ix, y+iy, this,
+                       i, mode_images[i], _(mode_text[i]));
+               window->add_subwindow(mode[i]);
+               if( (ix+=w) > mw ) mw = ix;
+               if( (h+=iy) > mh ) mh = h;
+               ix += pad;
        }
-       return _("Unknown");
+
+       ix = 0;  iy = mh+pad;
+       const char *mode_text = mode_to_text();
+       textbox = new BC_TextBox(x+ix, y+iy,
+               mwindow->theme->loadmode_w, 1, mode_text);
+       window->add_subwindow(textbox);
+       ix += textbox->get_w();
+       listbox = new LoadModeListBox(window, this, x+ix, y+iy);
+       window->add_subwindow(listbox);
+       mh = iy + textbox->get_h();
 }
 
-int LoadMode::create_objects()
+int LoadMode::reposition_window(int x, int y)
 {
-       int x = this->x, y = this->y;
-       char *default_text;
-       default_text = mode_to_text();
+       this->x = x;  this->y = y;
+       title->reposition_window(x, y);
+       int mw = title->get_w(), mh = title->get_h();
+       int pad = 5;
+       int ix = mw + 2*pad, iy = 0, x1 = ix;
+       int ww = mwindow->theme->loadmode_w + 24;
+       if( mw < ww ) mw = ww;
 
-       window->add_subwindow(title = new BC_Title(x, y, _("Insertion strategy:")));
-       y += title->get_h();
-       window->add_subwindow(textbox = new BC_TextBox(x, y,
-               mwindow->theme->loadmode_w, 1, default_text));
-       x += textbox->get_w();
-       window->add_subwindow(listbox = new LoadModeListBox(window, this, x, y));
+       for( int i=0; i<TOTAL_LOADMODES; ++i ) {
+               if( i == LOADMODE_NOTHING && !use_nothing) continue;
+               if( i == LOADMODE_NESTED && !use_nested) continue;
+               int text_line, w, h, toggle_x, toggle_y;
+               int text_x, text_y, text_w, text_h;
+               BC_Toggle::calculate_extents(window,
+                       mwindow->theme->get_image_set(mode_images[i]), 0,
+                       &text_line, &w, &h, &toggle_x, &toggle_y,
+                       &text_x, &text_y, &text_w, &text_h, 0, MEDIUMFONT);
+               if( line_wrap && ix+w > ww ) { ix = x1;  iy += h+pad; }
+               mode[i]->reposition_window(x+ix, y+iy);
+               if( (ix+=w) > mw ) mw = ix;
+               if( (h+=iy) > mh ) mh = h;
+               ix += pad;
+       }
 
+       ix = 0;  iy = mh+pad;
+       textbox->reposition_window(x+ix, y+iy);
+       ix += textbox->get_w();
+       listbox->reposition_window(x+ix, y+iy);
        return 0;
 }
 
 int LoadMode::get_h()
 {
        int result = 0;
-       result = MAX(result, title->get_h());
-       result = MAX(result, textbox->get_h());
+       load_mode_geometry(window, mwindow->theme,
+                       use_nothing, use_nested, line_wrap, 0, &result);
        return result;
 }
 
@@ -127,36 +252,26 @@ int LoadMode::get_y()
        return y;
 }
 
-int LoadMode::reposition_window(int x, int y)
+void LoadMode::update()
 {
-       this->x = x;
-       this->y = y;
-       title->reposition_window(x, y);
-       y += 20;
-       textbox->reposition_window(x, y);
-       x += textbox->get_w();
-       listbox->reposition_window(x,
-               y,
-               mwindow->theme->loadmode_w);
-       return 0;
+       for( int i=0; i<TOTAL_LOADMODES; ++i ) {
+               if( !mode[i] ) continue;
+               mode[i]->set_value(*output == i);
+       }
+       textbox->update(mode_to_text());
 }
 
+int LoadMode::set_line_wrap(int v)
+{
+       int ret = line_wrap;
+       line_wrap = v;
+       return ret;
+}
 
-LoadModeListBox::LoadModeListBox(BC_WindowBase *window,
-       LoadMode *loadmode,
-       int x,
-       int y)
- : BC_ListBox(x,
-       y,
-       loadmode->mwindow->theme->loadmode_w,
-       150,
-       LISTBOX_TEXT,
-       (ArrayList<BC_ListBoxItem *>*)&loadmode->load_modes,
-       0,
-       0,
-       1,
-       0,
-       1)
+LoadModeListBox::LoadModeListBox(BC_WindowBase *window, LoadMode *loadmode,
+               int x, int y)
+ : BC_ListBox(x, y, loadmode->mwindow->theme->loadmode_w, 150, LISTBOX_TEXT,
+       (ArrayList<BC_ListBoxItem *>*)&loadmode->load_modes, 0, 0, 1, 0, 1)
 {
        this->window = window;
        this->loadmode = loadmode;
@@ -170,13 +285,9 @@ int LoadModeListBox::handle_event()
 {
        LoadModeItem *item = (LoadModeItem *)get_selection(0, 0);
        if( item ) {
-               loadmode->textbox->update(item->get_text());
                *(loadmode->output) = item->value;
+               loadmode->update();
        }
        return 1;
 }
 
-
-
-
-
index 74745fea7be5870caf12b599487f768fa70bcb7d..2f358fca336143dddb64fd1dfaba3236fa5805d5 100644 (file)
@@ -27,8 +27,6 @@
 #include "mwindow.inc"
 #include "theme.inc"
 
-class LoadModeListBox;
-
 class LoadModeItem : public BC_ListBoxItem
 {
 public:
@@ -36,36 +34,48 @@ public:
        int value;
 };
 
+class LoadModeToggle : public BC_Toggle
+{
+public:
+       LoadModeToggle(int x, int y, LoadMode *window,
+               int value, const char *images, const char *tooltip);
+       int handle_event();
+       LoadMode *window;
+       int value;
+};
+
 class LoadMode
 {
 public:
        LoadMode(MWindow *mwindow,
-               BC_WindowBase *window,
-               int x,
-               int y,
-               int *output,
-               int use_nothing);
+               BC_WindowBase *window, int x, int y, int *output,
+               int use_nothing=1, int use_nested=0, int line_wrap=0);
        ~LoadMode();
-
-       int create_objects();
+       void create_objects();
        int reposition_window(int x, int y);
-       static int calculate_w(BC_WindowBase *gui, Theme *theme);
-       static int calculate_h(BC_WindowBase *gui, Theme *theme);
+       static void load_mode_geometry(BC_WindowBase *gui, Theme *theme,
+               int use_nothing, int use_nested, int line_wrap,
+               int *pw, int *ph);
+       static int calculate_w(BC_WindowBase *gui, Theme *theme,
+               int use_nothing=1, int use_nested=0, int line_wrap=0);
+       static int calculate_h(BC_WindowBase *gui, Theme *theme,
+               int use_nothing=1, int use_nested=0, int line_wrap=0);
        int get_h();
        int get_x();
        int get_y();
 
-       char* mode_to_text();
+       const char *mode_to_text();
+       void update();
+       int set_line_wrap(int v);
 
        BC_Title *title;
        BC_TextBox *textbox;
        LoadModeListBox *listbox;
        MWindow *mwindow;
        BC_WindowBase *window;
-       int x;
-       int y;
-       int *output;
-       int use_nothing;
+       int x, y, *output;
+       int use_nothing, use_nested, line_wrap;
+       LoadModeToggle *mode[TOTAL_LOADMODES];
        ArrayList<LoadModeItem*> load_modes;
 };
 
index bd4d78cb7ebcec01ab351827ce5a4a560f06e564..d0b7aaee4638c57185984c5b12998ee0585c43a6 100644 (file)
 #ifndef LOADMODE_INC
 #define LOADMODE_INC
 
+class LoadModeItem;
+class LoadModeToggle;
 class LoadMode;
+class LoadModeListBox;
 
 // used in paste_edls to only add assets, not clips
 #define LOADMODE_ASSETSONLY -1
index 12ae34e102b6d13ac4d7e39dfb847afa1da1863c..d8dfdfab3499922996e53ea3c4c00832e7c077c2 100644 (file)
@@ -630,7 +630,7 @@ void MenuEffectWindow::create_objects()
        format_tools->create_objects(x, y, asset->audio_data, asset->video_data,
                0, 0, 0, 1, 0, 0, &menueffects->use_labels, 0);
 
-       loadmode = new LoadMode(mwindow, this, x, y, &menueffects->load_mode, 1);
+       loadmode = new LoadMode(mwindow, this, x, y, &menueffects->load_mode);
        loadmode->create_objects();
 
        add_subwindow(new MenuEffectWindowOK(this));
index 9cc56e02cebef82a375146cdce4b704dd90acc7a..8386cfc6e7a70f8cfbf806f2e7cb2ba4e44629b5 100644 (file)
@@ -404,8 +404,8 @@ void RecordGUI::create_objects()
 
 // Controls
        int loadmode_w = LoadMode::calculate_w(this, mwindow->theme);
-       load_mode = new LoadMode(mwindow, this, get_w() / 2 - loadmode_w / 2, y,
-               &record->load_mode, 1);
+       load_mode = new LoadMode(mwindow, this,
+               get_w() / 2 - loadmode_w / 2, y, &record->load_mode);
        load_mode->create_objects();
        y += load_mode->get_h() + 5;
 
index 5d4875fcb1acf415518ede28d9b82fa49b82927e..653ec559f07994adcd34aee1df27b381b1911fb7 100644 (file)
@@ -1059,7 +1059,7 @@ void RenderWindow::create_objects()
        renderprofile->create_objects();
        y += 70;
 
-       loadmode = new LoadMode(mwindow, this, x, y, &render->load_mode, 1);
+       loadmode = new LoadMode(mwindow, this, x, y, &render->load_mode);
        loadmode->create_objects();
 
        add_subwindow(new BC_OKButton(this));
index f24a39e0b3ee96389b9e4f8d3972229aa050a6b7..803f2fc465542afec39b9179c744f0de2e44cd08 100644 (file)
@@ -546,6 +546,7 @@ BC_FileBox::BC_FileBox(int x, int y, const char *init_path,
        this->h_padding = h_padding;
        delete_thread = new BC_DeleteThread(this);
        rename_thread = 0;
+       y_margin = 0;
 }
 
 BC_FileBox::~BC_FileBox()
@@ -679,7 +680,9 @@ void BC_FileBox::create_objects()
                add_subwindow(filter_text = new BC_FileBoxFilterText(x1, y, this));
                add_subwindow(filter_popup =
                        new BC_FileBoxFilterMenu(x1 + filter_text->get_w(), y, this));
+               y += filter_text->get_h() + 10;
        }
+       y_margin = y;
 
 // listbox has to be active because refresh might be called from newfolder_thread
        listbox->activate();
@@ -781,6 +784,9 @@ int BC_FileBox::resize_event(int w, int h)
        set_w(w);  set_h(h);
        get_resources()->filebox_w = get_w();
        get_resources()->filebox_h = get_h();
+       y_margin = filter_text ?
+               filter_text->get_y() + filter_text->get_h() + 10 :
+               textbox->get_y() + textbox->get_h() + 10 ;
        flush();
        return 1;
 }
@@ -1324,6 +1330,11 @@ void BC_FileBox::create_listbox(int x, int y, int mode)
                add_subwindow(listbox = new BC_FileBoxListBox(x, y, this));
 }
 
+int BC_FileBox::get_y_margin()
+{
+       return y_margin;
+}
+
 char* BC_FileBox::get_path(int selection)
 {
        if(selection == 0)
index 115ac8b1a53bf2e82ed22cd2f79124cc39577d30..28d2deb257fd407ada904cd8a59d207a4a526fb4 100644 (file)
@@ -286,6 +286,7 @@ public:
        char* get_newfolder_title();
        char* get_rename_title();
        char* get_delete_title();
+       int get_y_margin();
        void delete_files();
        BC_Button* get_ok_button();
        BC_Button* get_cancel_button();
@@ -358,7 +359,7 @@ private:
        BC_NewFolderThread *newfolder_thread;
        BC_RenameThread *rename_thread;
        BC_DeleteThread *delete_thread;
-       int h_padding;
+       int h_padding, y_margin;
        ArrayList<BC_ListBoxItem*> recent_dirs;
 };
 
index ef29b0b6eac0dc8848673528f1333ec4d590a1fc..a7cb8b8752077bf87274964a4dc7a0908228908f 100644 (file)
@@ -551,9 +551,6 @@ int BC_ListBox::draw_button(int flush)
 // Draw the button for a popup listbox
        if( use_button && is_popup ) {
                int image_number = 0;
-
-               draw_top_background(parent_window, 0, 0, w, h);
-
                if( button_highlighted )
                        image_number = 1;
                if( current_operation == BUTTON_DN )
@@ -561,8 +558,9 @@ int BC_ListBox::draw_button(int flush)
                if( disabled )
                        image_number = 3;
 
-               pixmap->draw_pixmap(button_images[image_number],
-                       0, 0, w, h, 0, 0);
+               int iw = button_images[image_number]->get_w();
+               int ih = button_images[image_number]->get_h();
+               pixmap->draw_pixmap(button_images[image_number],0,0,iw,ih);
                flash(flush);
        }
        return 0;
index 0cd3bbe002b7249ac6d4be345dff6f057a647d65..7920b622a395c1a4f37aec4f34a6cf81fe64d1a0 100644 (file)
@@ -222,13 +222,6 @@ int ShapeWipeReset::handle_event()
        return 1;
 }
 
-int ShapeWipeReset::calculate_w(ShapeWipeMain *client)
-{
-       VFrame **reset_images = client->get_theme()->get_image_set("reset_button");
-       return reset_images[0]->get_w();
-}
-
-
 ShapeWipeShape::ShapeWipeShape(ShapeWipeMain *client,
                ShapeWipeWindow *window, int x, int y,
                int text_w, int list_h)
@@ -280,15 +273,10 @@ void ShapeWipeWindow::create_objects()
        y += bar->get_h() + pad;
 
        add_subwindow(title = new BC_Title(x, y, _("Shape:")));
-       int x1 = get_w()/5;
-       x = x1;
-       int tw = ww - x1 - ShapeWipeTumble::calculate_w() - pad -
-               BC_WindowBase::get_resources()->listbox_button[0]->get_w();
-       shape_text = new ShapeWipeShape(plugin, this, x1, y, tw, 200);
+       int x1 = 85, x2 = 355, x3 = 386;
+       shape_text = new ShapeWipeShape(plugin, this, x1, y, x2-x1, 200);
        shape_text->create_objects();
-       x += shape_text->get_w() + pad;
-       add_subwindow(new ShapeWipeTumble(plugin,
-               this, x, y));
+       add_subwindow(new ShapeWipeTumble(plugin, this, x3, y));
        y += shape_text->get_h() + pad;
 
        x = margin;
@@ -298,10 +286,8 @@ void ShapeWipeWindow::create_objects()
        shape_feather->create_objects();
        shape_feather->set_log_floatincrement(1);
        x += shape_feather->get_w() + 2*pad;
-       int sw = ww - ShapeWipeReset::calculate_w(plugin) - pad - x;
-       add_subwindow(shape_fslider = new ShapeWipeFSlider(plugin, this, x, y, sw));
-       x += shape_fslider->get_w() + 2*pad;
-       add_subwindow(shape_reset = new ShapeWipeReset(plugin, this, x, y));
+       add_subwindow(shape_fslider = new ShapeWipeFSlider(plugin, this, x, y, x2-x));
+       add_subwindow(shape_reset = new ShapeWipeReset(plugin, this, x3, y));
        y += shape_fslider->get_h() + pad;
 
        x = margin;
index f9f67c59bccfd7bc64b32499d3a6c9df4c945a32..b4fac85cc3074eeddaa8bdee7dabfd8d2b39b167 100644 (file)
@@ -109,7 +109,6 @@ public:
        ShapeWipeReset(ShapeWipeMain *client,
                ShapeWipeWindow *window, int x, int y);
        int handle_event();
-       static int calculate_w(ShapeWipeMain *client);
 
        ShapeWipeMain *client;
        ShapeWipeWindow *window;
index 00cb8d76dcdc82497df0b6fde7875c5f49ddff5f..7830a1d2e0fa6fdc3cdb99d0589be579e0e93f07 100644 (file)
@@ -256,7 +256,7 @@ void BlondCVTheme::initialize()
                        "ok_button");
 
        resources->dirbox_margin = 50;
-       resources->filebox_margin = 101;
+       resources->filebox_margin = 120;
        resources->file_color = 0x000000;
        resources->directory_color = 0x0000ff;
 
index 00892269f3cc51be1043c2b8f491ee5f9a671dbc..89cd2b94c111b1157829cb6a64a1c105c54d88bf 100644 (file)
@@ -172,7 +172,7 @@ void BlueDotTheme::initialize()
        resources->listbox_selected = BGREY;
 
        resources->dirbox_margin = 50;
-       resources->filebox_margin = 101;
+       resources->filebox_margin = 105;
        resources->file_color = 0x000000;
        resources->directory_color = DKBLUE;
        // COPIED FROM DEFAULT THEME <<4