From 1ef6069fe4a9b07fd312bda1b70b796b09b4f762 Mon Sep 17 00:00:00 2001 From: phoudoin Date: Wed, 2 Mar 2011 18:15:57 +0000 Subject: [PATCH] Fix why escape wasn't closing the find panel as expected (#75). Fix fullscreen icon layout spacing issue (#76). git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@576 94f232f2-1747-11df-bad5-a5bfde151594 --- src/apps/webpositive/BrowserWindow.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index 5a4de8c5d7..23e7973ee1 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -466,11 +466,11 @@ BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings, new BMessage(TOGGLE_FULLSCREEN)); toggleFullscreenButton->SetBackgroundMode(BitmapButton::MENUBAR_BACKGROUND); - BGroupLayout* menuBarGroup = BLayoutBuilder::Group<>(B_HORIZONTAL) + BGroupLayout* menuBarGroup = BLayoutBuilder::Group<>(B_HORIZONTAL, 0.0) .Add(mainMenu) .Add(toggleFullscreenButton, 0.0f) ; - + // Layout AddChild(BLayoutBuilder::Group<>(B_VERTICAL, 0.0) #if !INTEGRATE_MENU_INTO_TAB_BAR @@ -488,7 +488,7 @@ BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings, mainMenu->SetViewColor(B_TRANSPARENT_COLOR); fURLInputGroup->MakeFocus(true); - + fMenuGroup = menuBarGroup; fTabGroup = fTabManager->TabGroup()->GetLayout(); fNavigationGroup = navigationGroup; @@ -547,13 +547,6 @@ BrowserWindow::DispatchMessage(BMessage* message, BHandler* target) } else if (bytes[0] == B_RIGHT_ARROW && modifierKeys == B_COMMAND_KEY) { PostMessage(GO_FORWARD); return; - } else if (bytes[0] == B_ESCAPE) { - // Let the URL input handle escape when it is the target - if (target != fURLInputGroup->TextView()) { - // Otherwise do a stop - PostMessage(STOP); - return; - } } else if (bytes[0] == B_FUNCTION_KEY) { // Some function key Firefox compatibility int32 key; @@ -591,6 +584,10 @@ BrowserWindow::DispatchMessage(BMessage* message, BHandler* target) _InvokeButtonVisibly(fFindCloseButton); return; } + } else if (bytes[0] == B_ESCAPE) { + // Default escape key behavior: + PostMessage(STOP); + return; } } if (message->what == B_MOUSE_MOVED || message->what == B_MOUSE_DOWN