DataTranslations: use layout, standard format.
* Fix jpeg, jpeg2000. * Partialy fixes #11999.
This commit is contained in:
@@ -438,10 +438,8 @@ TranslatorReadView::TranslatorReadView(const char* name,
|
||||
if (fSettings->SetGetBool(JPEG_SET_SHOWREADWARNING, NULL))
|
||||
fShowErrorBox->SetValue(B_CONTROL_ON);
|
||||
|
||||
float padding = 5.0f;
|
||||
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, padding)
|
||||
.SetInsets(padding)
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(fAlwaysRGB32)
|
||||
.Add(fPhotoshopCMYK)
|
||||
.Add(fShowErrorBox)
|
||||
@@ -559,9 +557,8 @@ TranslatorWriteView::TranslatorWriteView(const char* name,
|
||||
if (fSettings->SetGetBool(JPEG_SET_GRAY1_AS_RGB24))
|
||||
fGrayAsRGB24->SetValue(B_CONTROL_ON);
|
||||
|
||||
float padding = 5.0f;
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, padding)
|
||||
.SetInsets(padding)
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(fQualitySlider)
|
||||
.Add(fSmoothingSlider)
|
||||
.Add(fProgress)
|
||||
@@ -686,22 +683,20 @@ TranslatorAboutView::TranslatorAboutView(const char* name)
|
||||
infoView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
infoView->MakeEditable(false);
|
||||
|
||||
float padding = 5.0f;
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, padding)
|
||||
.SetInsets(padding)
|
||||
.AddGroup(B_HORIZONTAL, padding)
|
||||
.Add(title)
|
||||
.Add(version)
|
||||
.AddGlue()
|
||||
.End()
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(title)
|
||||
.Add(version)
|
||||
.Add(infoView);
|
||||
}
|
||||
|
||||
|
||||
TranslatorView::TranslatorView(const char* name, TranslatorSettings* settings)
|
||||
:
|
||||
BTabView(name)
|
||||
BTabView(name, B_WIDTH_FROM_LABEL)
|
||||
{
|
||||
SetBorder(B_NO_BORDER);
|
||||
|
||||
AddTab(new TranslatorWriteView(B_TRANSLATE("Write"), settings->Acquire()));
|
||||
AddTab(new TranslatorReadView(B_TRANSLATE("Read"), settings->Acquire()));
|
||||
AddTab(new TranslatorAboutView(B_TRANSLATE("About")));
|
||||
|
||||
@@ -637,9 +637,8 @@ TranslatorWriteView::TranslatorWriteView(const char* name,
|
||||
if (fSettings->SetGetBool(JP2_SET_JPC))
|
||||
fCodeStreamOnly->SetValue(B_CONTROL_ON);
|
||||
|
||||
float padding = 10.0f;
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, padding)
|
||||
.SetInsets(padding)
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(fQualitySlider)
|
||||
.Add(fGrayAsRGB24)
|
||||
.Add(fCodeStreamOnly)
|
||||
@@ -728,14 +727,10 @@ TranslatorAboutView::TranslatorAboutView(const char* name)
|
||||
infoView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
infoView->MakeEditable(false);
|
||||
|
||||
float padding = 10.0f;
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, padding)
|
||||
.SetInsets(padding)
|
||||
.AddGroup(B_HORIZONTAL, padding)
|
||||
.Add(title)
|
||||
.Add(version)
|
||||
.AddGlue()
|
||||
.End()
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(title)
|
||||
.Add(version)
|
||||
.Add(infoView);
|
||||
}
|
||||
|
||||
@@ -745,8 +740,10 @@ TranslatorAboutView::TranslatorAboutView(const char* name)
|
||||
|
||||
TranslatorView::TranslatorView(const char* name, TranslatorSettings* settings)
|
||||
:
|
||||
BTabView(name)
|
||||
BTabView(name, B_WIDTH_FROM_LABEL)
|
||||
{
|
||||
SetBorder(B_NO_BORDER);
|
||||
|
||||
AddTab(new TranslatorWriteView(B_TRANSLATE("Write"),
|
||||
settings->Acquire()));
|
||||
AddTab(new TranslatorReadView(B_TRANSLATE("Read"),
|
||||
|
||||
Reference in New Issue
Block a user