Remove more unneeded headers
This commit is contained in:
parent
127fb9370b
commit
63f3071445
@ -15,15 +15,10 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QShortcut>
|
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
#include "Logging.h"
|
#include "Logging.h"
|
||||||
#include "Splitter.h"
|
#include "Splitter.h"
|
||||||
#include "Utils.h"
|
|
||||||
|
|
||||||
constexpr auto MaxWidth = (1 << 24) - 1;
|
constexpr auto MaxWidth = (1 << 24) - 1;
|
||||||
|
|
||||||
@ -180,4 +175,3 @@ splitter::calculateSidebarSizes(const QFont &f)
|
|||||||
|
|
||||||
return sz;
|
return sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,17 +18,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <iterator>
|
|
||||||
#include <map>
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QCoreApplication>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "Utils.h"
|
|
||||||
#include "dialogs/PreviewUploadOverlay.h"
|
#include "dialogs/PreviewUploadOverlay.h"
|
||||||
#include "emoji/PickButton.h"
|
#include "emoji/PickButton.h"
|
||||||
#include "popups/ReplyPopup.h"
|
#include "popups/ReplyPopup.h"
|
||||||
|
@ -651,4 +651,3 @@ utils::restoreCombobox(QComboBox *combo, const QString &value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QBuffer>
|
#include <QBuffer>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
|
#include <QPaintEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
#include <QScrollArea>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include "Cache.h"
|
#include "Cache.h"
|
||||||
#include "ChatPage.h"
|
#include "ChatPage.h"
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
#include <mtx/responses.hpp>
|
#include <mtx/responses.hpp>
|
||||||
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QPaintEvent>
|
|
||||||
#include <QScrollArea>
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QTabWidget>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
class QPaintEvent;
|
||||||
|
class QTabWidget;
|
||||||
|
class QScrollArea;
|
||||||
|
class QVBoxLayout;
|
||||||
|
|
||||||
namespace popups {
|
namespace popups {
|
||||||
|
|
||||||
|
@ -3,108 +3,106 @@
|
|||||||
#include <QLinearGradient>
|
#include <QLinearGradient>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
|
void
|
||||||
|
DropShadow::draw(QPainter &painter,
|
||||||
|
qint16 margin,
|
||||||
|
qreal radius,
|
||||||
|
QColor start,
|
||||||
|
QColor end,
|
||||||
|
qreal startPosition,
|
||||||
|
qreal endPosition0,
|
||||||
|
qreal endPosition1,
|
||||||
|
qreal width,
|
||||||
|
qreal height)
|
||||||
|
{
|
||||||
|
painter.setPen(Qt::NoPen);
|
||||||
|
|
||||||
void DropShadow::draw(QPainter &painter,
|
QLinearGradient gradient;
|
||||||
qint16 margin,
|
gradient.setColorAt(startPosition, start);
|
||||||
qreal radius,
|
gradient.setColorAt(endPosition0, end);
|
||||||
QColor start,
|
|
||||||
QColor end,
|
|
||||||
qreal startPosition,
|
|
||||||
qreal endPosition0,
|
|
||||||
qreal endPosition1,
|
|
||||||
qreal width,
|
|
||||||
qreal height)
|
|
||||||
{
|
|
||||||
painter.setPen(Qt::NoPen);
|
|
||||||
|
|
||||||
QLinearGradient gradient;
|
// Right
|
||||||
gradient.setColorAt(startPosition, start);
|
QPointF right0(width - margin, height / 2);
|
||||||
gradient.setColorAt(endPosition0, end);
|
QPointF right1(width, height / 2);
|
||||||
|
gradient.setStart(right0);
|
||||||
|
gradient.setFinalStop(right1);
|
||||||
|
painter.setBrush(QBrush(gradient));
|
||||||
|
// Deprecated in 5.13: painter.drawRoundRect(
|
||||||
|
// QRectF(QPointF(width - margin * radius, margin), QPointF(width, height -
|
||||||
|
// margin)), 0.0, 0.0);
|
||||||
|
painter.drawRoundedRect(
|
||||||
|
QRectF(QPointF(width - margin * radius, margin), QPointF(width, height - margin)),
|
||||||
|
0.0,
|
||||||
|
0.0);
|
||||||
|
|
||||||
// Right
|
// Left
|
||||||
QPointF right0(width - margin, height / 2);
|
QPointF left0(margin, height / 2);
|
||||||
QPointF right1(width, height / 2);
|
QPointF left1(0, height / 2);
|
||||||
gradient.setStart(right0);
|
gradient.setStart(left0);
|
||||||
gradient.setFinalStop(right1);
|
gradient.setFinalStop(left1);
|
||||||
painter.setBrush(QBrush(gradient));
|
painter.setBrush(QBrush(gradient));
|
||||||
// Deprecated in 5.13: painter.drawRoundRect(
|
painter.drawRoundedRect(
|
||||||
// QRectF(QPointF(width - margin * radius, margin), QPointF(width, height -
|
QRectF(QPointF(margin * radius, margin), QPointF(0, height - margin)), 0.0, 0.0);
|
||||||
// margin)), 0.0, 0.0);
|
|
||||||
painter.drawRoundedRect(
|
|
||||||
QRectF(QPointF(width - margin * radius, margin), QPointF(width, height - margin)),
|
|
||||||
0.0,
|
|
||||||
0.0);
|
|
||||||
|
|
||||||
// Left
|
// Top
|
||||||
QPointF left0(margin, height / 2);
|
QPointF top0(width / 2, margin);
|
||||||
QPointF left1(0, height / 2);
|
QPointF top1(width / 2, 0);
|
||||||
gradient.setStart(left0);
|
gradient.setStart(top0);
|
||||||
gradient.setFinalStop(left1);
|
gradient.setFinalStop(top1);
|
||||||
painter.setBrush(QBrush(gradient));
|
painter.setBrush(QBrush(gradient));
|
||||||
painter.drawRoundedRect(
|
painter.drawRoundedRect(
|
||||||
QRectF(QPointF(margin * radius, margin), QPointF(0, height - margin)), 0.0, 0.0);
|
QRectF(QPointF(width - margin, 0), QPointF(margin, margin)), 0.0, 0.0);
|
||||||
|
|
||||||
// Top
|
// Bottom
|
||||||
QPointF top0(width / 2, margin);
|
QPointF bottom0(width / 2, height - margin);
|
||||||
QPointF top1(width / 2, 0);
|
QPointF bottom1(width / 2, height);
|
||||||
gradient.setStart(top0);
|
gradient.setStart(bottom0);
|
||||||
gradient.setFinalStop(top1);
|
gradient.setFinalStop(bottom1);
|
||||||
painter.setBrush(QBrush(gradient));
|
painter.setBrush(QBrush(gradient));
|
||||||
painter.drawRoundedRect(
|
painter.drawRoundedRect(
|
||||||
QRectF(QPointF(width - margin, 0), QPointF(margin, margin)), 0.0, 0.0);
|
QRectF(QPointF(margin, height - margin), QPointF(width - margin, height)), 0.0, 0.0);
|
||||||
|
|
||||||
// Bottom
|
// BottomRight
|
||||||
QPointF bottom0(width / 2, height - margin);
|
QPointF bottomright0(width - margin, height - margin);
|
||||||
QPointF bottom1(width / 2, height);
|
QPointF bottomright1(width, height);
|
||||||
gradient.setStart(bottom0);
|
gradient.setStart(bottomright0);
|
||||||
gradient.setFinalStop(bottom1);
|
gradient.setFinalStop(bottomright1);
|
||||||
painter.setBrush(QBrush(gradient));
|
gradient.setColorAt(endPosition1, end);
|
||||||
painter.drawRoundedRect(
|
painter.setBrush(QBrush(gradient));
|
||||||
QRectF(QPointF(margin, height - margin), QPointF(width - margin, height)),
|
painter.drawRoundedRect(QRectF(bottomright0, bottomright1), 0.0, 0.0);
|
||||||
0.0,
|
|
||||||
0.0);
|
|
||||||
|
|
||||||
// BottomRight
|
// BottomLeft
|
||||||
QPointF bottomright0(width - margin, height - margin);
|
QPointF bottomleft0(margin, height - margin);
|
||||||
QPointF bottomright1(width, height);
|
QPointF bottomleft1(0, height);
|
||||||
gradient.setStart(bottomright0);
|
gradient.setStart(bottomleft0);
|
||||||
gradient.setFinalStop(bottomright1);
|
gradient.setFinalStop(bottomleft1);
|
||||||
gradient.setColorAt(endPosition1, end);
|
gradient.setColorAt(endPosition1, end);
|
||||||
painter.setBrush(QBrush(gradient));
|
painter.setBrush(QBrush(gradient));
|
||||||
painter.drawRoundedRect(QRectF(bottomright0, bottomright1), 0.0, 0.0);
|
painter.drawRoundedRect(QRectF(bottomleft0, bottomleft1), 0.0, 0.0);
|
||||||
|
|
||||||
// BottomLeft
|
// TopLeft
|
||||||
QPointF bottomleft0(margin, height - margin);
|
QPointF topleft0(margin, margin);
|
||||||
QPointF bottomleft1(0, height);
|
QPointF topleft1(0, 0);
|
||||||
gradient.setStart(bottomleft0);
|
gradient.setStart(topleft0);
|
||||||
gradient.setFinalStop(bottomleft1);
|
gradient.setFinalStop(topleft1);
|
||||||
gradient.setColorAt(endPosition1, end);
|
gradient.setColorAt(endPosition1, end);
|
||||||
painter.setBrush(QBrush(gradient));
|
painter.setBrush(QBrush(gradient));
|
||||||
painter.drawRoundedRect(QRectF(bottomleft0, bottomleft1), 0.0, 0.0);
|
painter.drawRoundedRect(QRectF(topleft0, topleft1), 0.0, 0.0);
|
||||||
|
|
||||||
// TopLeft
|
// TopRight
|
||||||
QPointF topleft0(margin, margin);
|
QPointF topright0(width - margin, margin);
|
||||||
QPointF topleft1(0, 0);
|
QPointF topright1(width, 0);
|
||||||
gradient.setStart(topleft0);
|
gradient.setStart(topright0);
|
||||||
gradient.setFinalStop(topleft1);
|
gradient.setFinalStop(topright1);
|
||||||
gradient.setColorAt(endPosition1, end);
|
gradient.setColorAt(endPosition1, end);
|
||||||
painter.setBrush(QBrush(gradient));
|
painter.setBrush(QBrush(gradient));
|
||||||
painter.drawRoundedRect(QRectF(topleft0, topleft1), 0.0, 0.0);
|
painter.drawRoundedRect(QRectF(topright0, topright1), 0.0, 0.0);
|
||||||
|
|
||||||
// TopRight
|
// Widget
|
||||||
QPointF topright0(width - margin, margin);
|
painter.setBrush(QBrush("#FFFFFF"));
|
||||||
QPointF topright1(width, 0);
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
gradient.setStart(topright0);
|
painter.drawRoundedRect(
|
||||||
gradient.setFinalStop(topright1);
|
QRectF(QPointF(margin, margin), QPointF(width - margin, height - margin)),
|
||||||
gradient.setColorAt(endPosition1, end);
|
radius,
|
||||||
painter.setBrush(QBrush(gradient));
|
radius);
|
||||||
painter.drawRoundedRect(QRectF(topright0, topright1), 0.0, 0.0);
|
}
|
||||||
|
|
||||||
// Widget
|
|
||||||
painter.setBrush(QBrush("#FFFFFF"));
|
|
||||||
painter.setRenderHint(QPainter::Antialiasing);
|
|
||||||
painter.drawRoundedRect(
|
|
||||||
QRectF(QPointF(margin, margin), QPointF(width - margin, height - margin)),
|
|
||||||
radius,
|
|
||||||
radius);
|
|
||||||
}
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "TextField.h"
|
#include "TextField.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QCoreApplication>
|
||||||
#include <QEventTransition>
|
#include <QEventTransition>
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <QApplication>
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user