summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2017-02-19 12:41:01 +0100
committerHeiko Tietze <tietze.heiko@googlemail.com>2017-02-27 15:47:43 +0000
commitbd8c68c99cce51a3368d8ddfd6e11dccb72d8f49 (patch)
tree2cc7809b00672daa4b8d905bb03795777d18c762 /include
parenttdf#105093 vcl PDF export: add embedded video testcase (diff)
downloadcore-bd8c68c99cce51a3368d8ddfd6e11dccb72d8f49.tar.gz
core-bd8c68c99cce51a3368d8ddfd6e11dccb72d8f49.zip
tdf#105829 Infobar design, tdf#102785 Font issue
Only one constructor to append an infobar Colors defined at one place in infobar.cxx based on InfoBarType Icons as an additional attribute of the notification Change-Id: I4dc85c2b4ef0b7eafc139290b3b4ee21636da6ec Reviewed-on: https://gerrit.libreoffice.org/34426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/classificationhelper.hxx3
-rw-r--r--include/sfx2/infobar.hxx40
-rw-r--r--include/sfx2/viewfrm.hxx8
3 files changed, 19 insertions, 32 deletions
diff --git a/include/sfx2/classificationhelper.hxx b/include/sfx2/classificationhelper.hxx
index 18dd3515b665..3ad53c620259 100644
--- a/include/sfx2/classificationhelper.hxx
+++ b/include/sfx2/classificationhelper.hxx
@@ -17,6 +17,7 @@
#include <rtl/ustring.hxx>
#include <sfx2/dllapi.h>
+#include <sfx2/infobar.hxx>
class SfxObjectShell;
class SfxViewFrame;
@@ -66,7 +67,7 @@ public:
void SetBACName(const OUString& rName, SfxClassificationPolicyType eType);
/// If GetImpactScale() and GetImpactLevel*() will return something meaningful.
bool HasImpactLevel();
- basegfx::BColor GetImpactLevelColor();
+ InfoBarType GetImpactLevelType();
/// Larger value means more confidential.
sal_Int32 GetImpactLevel();
/// Comparing the GetImpactLevel() result is only meaningful when the impact scale is the same.
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index 3043a2f7c0b9..d78aed2d61a9 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -18,6 +18,13 @@
#include <sfx2/dllapi.h>
#include <sfx2/childwin.hxx>
+enum class InfoBarType {
+ Info,
+ Success,
+ Warning,
+ Danger
+};
+
/** SfxChildWindow for positioning the InfoBar in the view.
*/
class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow
@@ -43,25 +50,24 @@ class SfxInfoBarWindow : public vcl::Window
{
private:
OUString m_sId;
- VclPtr<FixedText> m_pMessage;
- VclPtr<Button> m_pCloseBtn;
+ VclPtr<FixedImage> m_pImage;
+ VclPtr<FixedText> m_pMessage;
+ VclPtr<Button> m_pCloseBtn;
std::vector< VclPtr<PushButton> > m_aActionBtns;
- basegfx::BColor m_aBackgroundColor;
- basegfx::BColor m_aForegroundColor;
public:
SfxInfoBarWindow( vcl::Window* parent, const OUString& sId,
const OUString& sMessage,
- const basegfx::BColor* pBackgroundColor,
- const basegfx::BColor* pForegroundColor,
- const basegfx::BColor* pMessageColor,
- WinBits nMessageStyle );
+ InfoBarType infoBarType,
+ WinBits nMessageStyle);
virtual ~SfxInfoBarWindow( ) override;
virtual void dispose() override;
const OUString& getId() const { return m_sId; }
virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override;
virtual void Resize( ) override;
+ basegfx::BColor m_aBackgroundColor;
+ basegfx::BColor m_aForegroundColor;
/** Add button to Infobar.
* Infobar takes ownership of the button so the button is
@@ -73,14 +79,6 @@ class SfxInfoBarWindow : public vcl::Window
DECL_LINK( CloseHandler, Button*, void );
};
-
-enum class InfoBarType {
- Info,
- Success,
- Warning,
- Danger
-};
-
class SfxInfoBarContainerWindow : public vcl::Window
{
private:
@@ -94,14 +92,8 @@ 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,
- WinBits nMessageStyle);
+ InfoBarType ibType,
+ WinBits nMessageStyle = WB_LEFT|WB_VCENTER);
VclPtr<SfxInfoBarWindow> getInfoBar(const OUString& sId);
void removeInfoBar(VclPtr<SfxInfoBarWindow> const & pInfoBar);
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 1ae2a58ba157..2b6093ef3679 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -174,13 +174,7 @@ public:
VclPtr<SfxInfoBarWindow> AppendInfoBar(const OUString& sId,
const OUString& sMessage,
InfoBarType aInfoBarType,
- WinBits nMessageStyle = 0);
- VclPtr<SfxInfoBarWindow> AppendInfoBar(const OUString& sId,
- const OUString& sMessage,
- const basegfx::BColor* pBackgroundColor = nullptr,
- const basegfx::BColor* pForegroundColor = nullptr,
- const basegfx::BColor* pMessageColor = nullptr,
- WinBits nMessageStyle = 0);
+ WinBits nMessageStyle = WB_LEFT|WB_VCENTER);
void RemoveInfoBar(const OUString& sId);
SAL_DLLPRIVATE void GetDocNumber_Impl();