From e7bd2ed8cdcdc0124ecfd854971bd427cb46a9d2 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sun, 22 Jan 2017 16:12:26 +0100 Subject: [PATCH] LineEdit: Make the side widgets occupy full height --- src/lib/3rdparty/lineedit.cpp | 12 ++++++++++-- src/lib/3rdparty/lineedit.h | 5 +++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/lib/3rdparty/lineedit.cpp b/src/lib/3rdparty/lineedit.cpp index 2c4b339c8..73505227b 100644 --- a/src/lib/3rdparty/lineedit.cpp +++ b/src/lib/3rdparty/lineedit.cpp @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2010-2014 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2010-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -399,3 +399,11 @@ void LineEdit::mouseDoubleClickEvent(QMouseEvent* event) QLineEdit::mouseDoubleClickEvent(event); } + +void LineEdit::resizeEvent(QResizeEvent *event) +{ + QLineEdit::resizeEvent(event); + + m_leftWidget->setFixedHeight(height()); + m_rightWidget->setFixedHeight(height()); +} diff --git a/src/lib/3rdparty/lineedit.h b/src/lib/3rdparty/lineedit.h index d72b72432..a7564728a 100644 --- a/src/lib/3rdparty/lineedit.h +++ b/src/lib/3rdparty/lineedit.h @@ -29,8 +29,8 @@ * SUCH DAMAGE. */ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2010-2014 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2010-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -118,6 +118,7 @@ protected: void mousePressEvent(QMouseEvent* event); void mouseReleaseEvent(QMouseEvent* event); void mouseDoubleClickEvent(QMouseEvent* event); + void resizeEvent(QResizeEvent *event) override; bool event(QEvent* event); QMenu* createContextMenu();