QILineEdit.cpp revision c58f1213e628a545081c70e26c6b67a841cff880
/* $Id$ */
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* QILineEdit class implementation
*/
/*
* Copyright (C) 2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "QILineEdit.h"
/* Qt includes */
#include <QStyleOptionFrame>
#if defined (Q_WS_WIN32)
#include <QWindowsVistaStyle>
#include <QLibrary>
#endif
{
}
{
}
{
sof.midLineWidth = 0;
/* The margins are based on qlineedit.cpp of Qt. Maybe they where changed
* at some time in the future. */
#if defined (Q_WS_WIN32)
/* Vista l&f style has a bug where the last parameter of sizeFromContents
* function ('widget' what corresponds to 'this' in our class) is ignored.
* Due to it QLineEdit processed as QComboBox and size calculation includes
* non-existing combo-box button of 23 pix in width. So fixing it here: */
{
/* Check if l&f style theme is really active else painting performed by
* Windows Classic theme and there is no such shifting error. */
typedef bool (*IsAppThemedFunction)();
}
#endif
return sa;
}