mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 02:53:25 -08:00
[Client] Flat moderation headers and detail tab shape
This commit is contained in:
parent
2b4019ccaf
commit
e8ebadf0bd
7 changed files with 180 additions and 0 deletions
25
cockatrice/src/interface/widgets/tabs/moderation_tab_style.h
Normal file
25
cockatrice/src/interface/widgets/tabs/moderation_tab_style.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef MODERATION_TAB_STYLE_H
|
||||
#define MODERATION_TAB_STYLE_H
|
||||
|
||||
#include <QProxyStyle>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
/**
|
||||
* Flat tab shapes for the moderation detail tabs (report queue detailTabs).
|
||||
* Replaces the native tab frame with the palette Window background plus a
|
||||
* 2px Highlight underline on the selected tab and a faint Highlight wash on
|
||||
* hover. Labels (text, elide, focus) are left to the base style, so keyboard
|
||||
* focus stays distinguishable.
|
||||
*/
|
||||
class ModerationTabStyle : public QProxyStyle
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ModerationTabStyle(QStyle *base = nullptr);
|
||||
void drawControl(ControlElement element,
|
||||
const QStyleOption *option,
|
||||
QPainter *painter,
|
||||
const QWidget *widget = nullptr) const override;
|
||||
};
|
||||
|
||||
#endif // MODERATION_TAB_STYLE_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue