Commit e7ef2785 authored by brettw@chromium.org's avatar brettw@chromium.org

Some views GTK fixes.

Fix the crazy font on infobars by reducing the "medium" font size.

Make tab dragging not immediately crash by crating a dragged tab container.

Review URL: http://codereview.chromium.org/155253

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20209 0039d316-1c4b-4281-b951-d872f2087c98
parent 70be00a4
......@@ -170,7 +170,11 @@ void ResourceBundle::LoadFontsIfNecessary() {
*small_font_ = base_font_->DeriveFont(-2);
medium_font_.reset(new gfx::Font());
#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS)
*medium_font_ = base_font_->DeriveFont(2);
#else
*medium_font_ = base_font_->DeriveFont(3);
#endif
medium_bold_font_.reset(new gfx::Font());
*medium_bold_font_ =
......
......@@ -13,6 +13,8 @@
#include "views/widget/widget.h"
#if defined(OS_WIN)
#include "views/widget/widget_win.h"
#elif defined(OS_LINUX)
#include "views/widget/widget_gtk.h"
#endif
const int kTransparentAlpha = 200;
......@@ -57,7 +59,10 @@ DraggedTabView::DraggedTabView(TabContents* datasource,
show_contents_on_drag_ = false;
}
#else
NOTIMPLEMENTED();
container_.reset(new views::WidgetGtk(views::WidgetGtk::TYPE_POPUP));
container_->set_delete_on_destroy(false);
container_->Init(NULL, gfx::Rect(0, 0, 0, 0));
container_->SetContentsView(this);
#endif
}
......
......@@ -9,11 +9,16 @@
#include "base/gfx/point.h"
#include "base/gfx/size.h"
#include "base/task.h"
#include "build/build_config.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/view.h"
namespace views {
#if defined(OS_WIN)
class WidgetWin;
#elif defined(OS_LINUX)
class WidgetGtk;
#endif
}
namespace gfx {
class Point;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment