diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-02-01 10:14:59 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-02-01 10:29:37 +0000 |
commit | e78be1c18fc0a3f893023e3086d8cdb5e6d5a6b9 (patch) | |
tree | 8c9c6e46415a11d0ef5be3fc90dfb7046378306b /include/sfx2/infobar.hxx | |
parent | bbd34216dca07bb37b9188147c42e64bbf875d54 (diff) |
InfoBar: Introduce different types
Makes it easier to push various infobars without specifiying the
colors manually.
Change-Id: I0f861ba02409a42ba2ae767a1ca7634eaf0e7aef
Reviewed-on: https://gerrit.libreoffice.org/33777
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'include/sfx2/infobar.hxx')
-rw-r--r-- | include/sfx2/infobar.hxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx index 97671a968f05..3043a2f7c0b9 100644 --- a/include/sfx2/infobar.hxx +++ b/include/sfx2/infobar.hxx @@ -69,15 +69,18 @@ class SfxInfoBarWindow : public vcl::Window */ void addButton(PushButton* pButton); - // Colors - static basegfx::BColor getSuccessColor(); - static basegfx::BColor getDangerColor(); - static basegfx::BColor getWarningColor(); - private: DECL_LINK( CloseHandler, Button*, void ); }; + +enum class InfoBarType { + Info, + Success, + Warning, + Danger +}; + class SfxInfoBarContainerWindow : public vcl::Window { private: @@ -91,6 +94,10 @@ class SfxInfoBarContainerWindow : public vcl::Window VclPtr<SfxInfoBarWindow> appendInfoBar(const OUString& sId, const OUString& sMessage, + InfoBarType aInfoBarType, + WinBits nMessageStyle); + VclPtr<SfxInfoBarWindow> appendInfoBar(const OUString& sId, + const OUString& sMessage, const basegfx::BColor* pBackgroundColor, const basegfx::BColor* pForegroundColor, const basegfx::BColor* pMessageColor, |