ui/widget/material/base/focus_ring.h¶
Material Design focus indicator for keyboard navigation. More...
Namespaces¶
| Name |
|---|
| cf |
| cf::ui |
| cf::ui::widget |
| cf::ui::widget::material |
| cf::ui::widget::material::base |
Classes¶
| Name | |
|---|---|
| class | cf::ui::widget::material::base::MdFocusIndicator Material Design focus indicator. |
Detailed Description¶
Material Design focus indicator for keyboard navigation.
Author: N/A
Version: N/A
Since: N/A
Date: N/A
Manages the focus ring indicator for Material Design widgets. Provides animated entrance/exit when widgets gain or lose focus.
Source code¶
#pragma once
#include "color.h"
#include "components/material/cfmaterial_animation_factory.h"
#include <QObject>
class QPainter;
class QPainterPath;
namespace cf::ui::widget::material::base {
class CF_UI_EXPORT MdFocusIndicator : public QObject {
Q_OBJECT
public:
explicit MdFocusIndicator(cf::WeakPtr<components::material::CFMaterialAnimationFactory> factory,
QObject* parent = nullptr);
void onFocusIn();
void onFocusOut();
void paint(QPainter* painter, const QPainterPath& shape,
const cf::ui::base::CFColor& indicatorColor);
private:
float m_progress = 0.0f;
cf::WeakPtr<components::material::CFMaterialAnimationFactory> m_animator;
};
} // namespace cf::ui::widget::material::base
Updated on 2026-03-09 at 10:14:01 +0000