Files
tdesktop/Telegram/lib_ui/ui/widgets/box_content_divider.h
allhaileris afb81b8278
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
init
2026-02-16 15:50:16 +03:00

50 lines
1.1 KiB
C++

// This file is part of Desktop App Toolkit,
// a set of libraries for developing nice desktop applications.
//
// For license and copyright information please follow this link:
// https://github.com/desktop-app/legal/blob/master/LEGAL
//
#pragma once
#include "ui/rp_widget.h"
#include "ui/rect_part.h"
namespace style {
struct DividerBar;
} // namespace style
namespace st {
extern const style::DividerBar &defaultDividerBar;
extern const int &boxDividerHeight;
} // namespace st
namespace Ui {
class BoxContentDivider : public Ui::RpWidget {
public:
BoxContentDivider(
QWidget *parent,
int height = st::boxDividerHeight,
const style::DividerBar &st = st::defaultDividerBar,
RectParts parts = RectPart::Top | RectPart::Bottom);
[[nodiscard]] const style::color &color() const;
QAccessible::Role accessibilityRole() override {
return QAccessible::Role::Separator;
}
protected:
void paintEvent(QPaintEvent *e) override;
void paintTop(QPainter &p, int skip = 0);
void paintBottom(QPainter &p, int skip = 0);
private:
const style::DividerBar &_st;
const RectParts _parts;
};
} // namespace Ui