mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:47:45 +00:00
Taskbar: Show window progress as a progress bar behind the window title
If a window in the taskbar has progress, we'll now draw that progress in the form of a progress bar behind the window title on the taskbar button for the window.
This commit is contained in:
parent
1d6ec51bee
commit
e263dc8427
4 changed files with 107 additions and 0 deletions
|
@ -62,6 +62,16 @@ public:
|
|||
void set_minimized(bool minimized) { m_minimized = minimized; }
|
||||
bool is_minimized() const { return m_minimized; }
|
||||
|
||||
void set_progress(int progress)
|
||||
{
|
||||
if (m_progress == progress)
|
||||
return;
|
||||
m_progress = progress;
|
||||
m_button->update();
|
||||
}
|
||||
|
||||
int progress() const { return m_progress; }
|
||||
|
||||
const Gfx::Bitmap* icon() const { return m_icon.ptr(); }
|
||||
|
||||
private:
|
||||
|
@ -72,6 +82,7 @@ private:
|
|||
RefPtr<Gfx::Bitmap> m_icon;
|
||||
bool m_active { false };
|
||||
bool m_minimized { false };
|
||||
int m_progress { -1 };
|
||||
};
|
||||
|
||||
class WindowList {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue