X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fappearanceprefs.C;h=e27ebd02354ce14628dc61b41046819bcfbaf9fa;hp=766cf6ce2c9fd3f61e4ec48a1ee4cd6bc945b0a7;hb=c3edaf190bc7ba23acdddded9635aad2d0fe9124;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1 diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.C b/cinelerra-5.1/cinelerra/appearanceprefs.C index 766cf6ce..e27ebd02 100644 --- a/cinelerra-5.1/cinelerra/appearanceprefs.C +++ b/cinelerra-5.1/cinelerra/appearanceprefs.C @@ -43,6 +43,7 @@ AppearancePrefs::AppearancePrefs(MWindow *mwindow, PreferencesWindow *pwindow) hex = 0; feet = 0; thumbnails = 0; + thumbnail_size = 0; } AppearancePrefs::~AppearancePrefs() @@ -54,6 +55,7 @@ AppearancePrefs::~AppearancePrefs() delete hex; delete feet; delete thumbnails; + delete thumbnail_size; } @@ -69,6 +71,7 @@ void AppearancePrefs::create_objects() add_subwindow(new BC_Title(x, y, _("Layout:"), LARGEFONT, resources->text_default)); y += 35; + int y1 = y; ViewTheme *theme; add_subwindow(new BC_Title(x, y, _("Theme:"))); @@ -81,7 +84,24 @@ void AppearancePrefs::create_objects() add_subwindow(new BC_Title(x, y, _("Plugin Icons:"))); add_subwindow(plugin_icons = new ViewPluginIcons(x1, y, pwindow)); plugin_icons->create_objects(); - y += plugin_icons->get_h() + 5; + y += plugin_icons->get_h() + 15; + x1 = get_w()/2; + + int x2 = x1 + 160, y2 = y; + y = y1; + add_subwindow(new BC_Title(x1, y, _("View thumbnail size:"))); + thumbnail_size = new ViewThumbnailSize(pwindow, this, x2, y); + thumbnail_size->create_objects(); + y += thumbnail_size->get_h() + 5; + add_subwindow(new BC_Title(x1, y, _("Vicon memory size:"))); + vicon_size = new ViewViconSize(pwindow, this, x2, y); + vicon_size->create_objects(); + y += vicon_size->get_h() + 5; + add_subwindow(new BC_Title(x1, y, _("Vicon color mode:"))); + add_subwindow(vicon_color_mode = new ViewViconColorMode(pwindow, x2, y)); + vicon_color_mode->create_objects(); + y += vicon_color_mode->get_h() + 5; + y = bmax(y, y2); y += 10; add_subwindow(new BC_Bar(5, y, get_w() - 10)); @@ -90,13 +110,12 @@ void AppearancePrefs::create_objects() add_subwindow(new BC_Title(x, y, _("Time Format:"), LARGEFONT, resources->text_default)); - x1 = get_w()/2; add_subwindow(new BC_Title(x1, y, _("Flags:"), LARGEFONT, resources->text_default)); y += get_text_height(LARGEFONT) + 5; y += 10; - int y1 = y; + y1 = y; add_subwindow(hms = new TimeFormatHMS(pwindow, this, pwindow->thread->edl->session->time_format == TIME_HMS, @@ -400,6 +419,87 @@ int ViewThumbnails::handle_event() } +ViewThumbnailSize::ViewThumbnailSize(PreferencesWindow *pwindow, + AppearancePrefs *aprefs, int x, int y) + : BC_TumbleTextBox(aprefs, + pwindow->thread->preferences->awindow_picon_h, + 16, 512, x, y, 80) + +{ + this->pwindow = pwindow; + this->aprefs = aprefs; +} + +int ViewThumbnailSize::handle_event() +{ + int v = atoi(get_text()); + bclamp(v, 16,512); + pwindow->thread->preferences->awindow_picon_h = v; + return 1; +} + +ViewViconSize::ViewViconSize(PreferencesWindow *pwindow, + AppearancePrefs *aprefs, int x, int y) + : BC_TumbleTextBox(aprefs, + pwindow->thread->preferences->vicon_size, + 16, 512, x, y, 80) + +{ + this->pwindow = pwindow; + this->aprefs = aprefs; +} + +int ViewViconSize::handle_event() +{ + int v = atoi(get_text()); + bclamp(v, 16,512); + pwindow->thread->preferences->vicon_size = v; + return 1; +} + +ViewViconColorMode::ViewViconColorMode(PreferencesWindow *pwindow, int x, int y) + : BC_PopupMenu(x, y, 100, + _(vicon_color_modes[pwindow->thread->preferences->vicon_color_mode]), 1) +{ + this->pwindow = pwindow; +} +ViewViconColorMode::~ViewViconColorMode() +{ +} + +const char *ViewViconColorMode::vicon_color_modes[] = { + N_("Low"), + N_("Med"), + N_("High"), +}; + +void ViewViconColorMode::create_objects() +{ + for( int id=0,nid=sizeof(vicon_color_modes)/sizeof(vicon_color_modes[0]); idthread->preferences->vicon_color_mode])); + return 1; +} + +ViewViconColorModeItem::ViewViconColorModeItem(ViewViconColorMode *popup, const char *text, int id) + : BC_MenuItem(text) +{ + this->popup = popup; + this->id = id; +} + +int ViewViconColorModeItem::handle_event() +{ + popup->set_text(get_text()); + popup->pwindow->thread->preferences->vicon_color_mode = id; + return popup->handle_event(); +} + UseTipWindow::UseTipWindow(PreferencesWindow *pwindow, int x, int y) : BC_CheckBox(x, @@ -571,7 +671,7 @@ void YuvColorSpace::create_objects() int YuvColorSpace::handle_event() { - set_text(color_space[pwindow->thread->preferences->yuv_color_space]); + set_text(_(color_space[pwindow->thread->preferences->yuv_color_space])); return 1; }