ActivityMonitor: Settings now modal when always on top enabled.
* #9534 Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
043ffc015a
commit
89e0a7fb84
@@ -253,6 +253,13 @@ ActivityWindow::ActivityViewAt(int32 index) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
ActivityWindow::IsAlwaysOnTop() const
|
||||||
|
{
|
||||||
|
return fAlwaysOnTop->IsMarked();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ActivityWindow::BroadcastToActivityViews(BMessage* message, BView* exceptToView)
|
ActivityWindow::BroadcastToActivityViews(BMessage* message, BView* exceptToView)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public:
|
|||||||
BView* exceptToView = NULL);
|
BView* exceptToView = NULL);
|
||||||
|
|
||||||
bigtime_t RefreshInterval() const;
|
bigtime_t RefreshInterval() const;
|
||||||
|
bool IsAlwaysOnTop() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t _OpenSettings(BFile& file, uint32 mode);
|
status_t _OpenSettings(BFile& file, uint32 mode);
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ SettingsWindow::SettingsWindow(ActivityWindow* target)
|
|||||||
.Add(fIntervalSlider)
|
.Add(fIntervalSlider)
|
||||||
.SetInsets(10, 10, 10, 10)
|
.SetInsets(10, 10, 10, 10)
|
||||||
);
|
);
|
||||||
|
if (target->IsAlwaysOnTop())
|
||||||
|
SetFeel(B_MODAL_ALL_WINDOW_FEEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -151,4 +153,3 @@ SettingsWindow::_RelativeTo(BWindow* window)
|
|||||||
return BRect(frame.right - 150, frame.top + frame.Height() / 4,
|
return BRect(frame.right - 150, frame.top + frame.Height() / 4,
|
||||||
frame.right + 200, frame.top + frame.Height() / 4 + 50);
|
frame.right + 200, frame.top + frame.Height() / 4 + 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user