Revert "TIFFTranslator: Resize menu field to preferred width."
This reverts commit d9dae4d313
.
This commit is contained in:
parent
6a0d79319a
commit
c6fa4474a4
@ -120,8 +120,7 @@ TIFFView::TIFFView(const char* name, uint32 flags,
|
||||
// TODO ? - strip encoding is not implemented in libTIFF for this compression
|
||||
// add_menu_item(menu, COMPRESSION_JP2000, "JPEG2000", currentCompression);
|
||||
|
||||
fCompressionMF = new BMenuField("compression",
|
||||
B_TRANSLATE("Use compression:"), menu);
|
||||
fCompressionMF = new BMenuField(B_TRANSLATE("Use compression:"), menu);
|
||||
|
||||
// Build the layout
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, 7)
|
||||
@ -159,6 +158,7 @@ TIFFView::AllAttached()
|
||||
fCompressionMF->Menu()->SetTargetForItems(this);
|
||||
fCompressionMF->SetDivider(
|
||||
fCompressionMF->StringWidth(fCompressionMF->Label()) + 3);
|
||||
fCompressionMF->ResizeToPreferred();
|
||||
}
|
||||
|
||||
|
||||
@ -172,22 +172,9 @@ TIFFView::MessageReceived(BMessage* message)
|
||||
fSettings->SetGetInt32(TIFF_SETTING_COMPRESSION, &value);
|
||||
fSettings->SaveSettings();
|
||||
}
|
||||
fCompressionMF->ResizeToPreferred();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
BView::MessageReceived(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TIFFView::WindowActivated(bool active)
|
||||
{
|
||||
static bool firstRun = true;
|
||||
|
||||
if (firstRun) {
|
||||
firstRun = false;
|
||||
fCompressionMF->ResizeToPreferred();
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,6 @@ public:
|
||||
|
||||
virtual void AllAttached();
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void WindowActivated(bool active);
|
||||
|
||||
enum {
|
||||
MSG_COMPRESSION_CHANGED = 'cmch',
|
||||
|
Loading…
Reference in New Issue
Block a user