merged hv7 mod
[goodguy/history.git] / cinelerra-5.1 / cinelerra / formattools.C
index 60d0b6c2905d5dce9d1295f7151dacdbcf18ebd8..7d94acdc8bda3dd592e139cc09d60efe116f94c9 100644 (file)
@@ -118,6 +118,7 @@ void FormatTools::create_objects(
        int x = init_x;
        int y = init_y;
        int ylev = init_y;
+       int margin = mwindow->theme->widget_border;
 
        this->locked_compressor = locked_compressor;
        this->recording = recording;
@@ -179,10 +180,10 @@ void FormatTools::create_objects(
 
        x = init_x;
        window->add_subwindow(format_title = new BC_Title(x, y, _("File Format:")));
-       x += 90;
+       x += format_title->get_w() + margin;
        window->add_subwindow(format_text = new BC_TextBox(x, y, 160, 1,
                File::formattostr(asset->format)));
-       x += format_text->get_w();
+       x += format_text->get_w() + margin;
 //printf("FormatTools::create_objects %d %p\n", __LINE__, window);
        window->add_subwindow(format_button = new FormatFormat(x, y, this));
        format_button->create_objects();
@@ -194,14 +195,13 @@ void FormatTools::create_objects(
        format_ffmpeg->create_objects();
        x = init_x;
        y += format_button->get_h() + 10;
-       if(do_audio)
-       {
-               window->add_subwindow(audio_title = new BC_Title(x, y, _("Audio:"), LARGEFONT,  BC_WindowBase::get_resources()->audiovideo_color));
-               x += 80;
+       if( do_audio ) {
+               window->add_subwindow(audio_title = new BC_Title(x, y, _("Audio:"), LARGEFONT,
+                       BC_WindowBase::get_resources()->audiovideo_color));
+               x += audio_title->get_w() + margin;
                window->add_subwindow(aparams_button = new FormatAParams(mwindow, this, x, y));
-               x += aparams_button->get_w() + 10;
-               if(prompt_audio)
-               {
+               x += aparams_button->get_w() + margin;
+               if(prompt_audio) {
                        window->add_subwindow(audio_switch = new FormatAudio(x, y, this, asset->audio_data));
                }
                x = init_x;
@@ -225,30 +225,27 @@ void FormatTools::create_objects(
        }
 
 //printf("FormatTools::create_objects 7\n");
-       if(do_video)
-       {
-               if(horizontal_layout && do_audio){
+       if( do_video ) {
+               if( horizontal_layout && do_audio ) {
                        x += 370;
                        y = ylev;
                }
 
 //printf("FormatTools::create_objects 8\n");
-               window->add_subwindow(video_title = new BC_Title(x, y, _("Video:"), LARGEFONT,  BC_WindowBase::get_resources()->audiovideo_color));
-               x += 80;
-               if(prompt_video_compression)
-               {
+               window->add_subwindow(video_title = new BC_Title(x, y, _("Video:"), LARGEFONT,
+                       BC_WindowBase::get_resources()->audiovideo_color));
+               x += video_title->get_w() + margin;
+               if(prompt_video_compression) {
                        window->add_subwindow(vparams_button = new FormatVParams(mwindow, this, x, y));
-                       x += vparams_button->get_w() + 10;
+                       x += vparams_button->get_w() + margin;
                }
 
 //printf("FormatTools::create_objects 9\n");
-               if(prompt_video)
-               {
+               if(prompt_video) {
                        window->add_subwindow(video_switch = new FormatVideo(x, y, this, asset->video_data));
                        y += video_switch->get_h();
                }
-               else
-               {
+               else {
                        y += vparams_button->get_h();
                }