Bug 950564 part.2 Fix complex text input panel width as focused plugin width if it's not too narrow r=smichaud

This commit is contained in:
Masayuki Nakano 2013-12-23 09:14:58 +09:00
Родитель 12c8ad6e3a
Коммит 54c805be4d
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -162,12 +162,11 @@ using namespace mozilla;
viewRect.origin = [[view window] convertBaseToScreen:viewRect.origin];
}
NSRect selfRect = [self frame];
// XXX Is this work well with Retina display?
CGFloat minWidth = static_cast<CGFloat>(
Preferences::GetUint("ui.plugin.panel.min-width", 500));
NSRect rect = NSMakeRect(viewRect.origin.x,
viewRect.origin.y - selfRect.size.height,
std::min(viewRect.size.width, minWidth),
std::max(viewRect.size.width, minWidth),
selfRect.size.height);
// Adjust to screen.