diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-04 11:34:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-06 09:57:53 +0200 |
commit | a30a5d1b8af18d19526f1980df41857f455cc8ef (patch) | |
tree | e8add75abca3c336cbc46936a7d19028ba4251aa /cui/source/inc | |
parent | 7665246ac8addc002f74e3a9b22d1baeda448af3 (diff) |
weld AboutDialog
use a native GtkAboutDialog on that platform and refactor the current cui about
dialog body to form the body of a vcl AboutDialog
use add_button to add the buttons to whichever is preferred of the headerbar
or action-area
Change-Id: I67e0b36dcb8d3fa08ec4f0397b0f6185b0778675
Reviewed-on: https://gerrit.libreoffice.org/73439
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/inc')
-rw-r--r-- | cui/source/inc/about.hxx | 59 |
1 files changed, 18 insertions, 41 deletions
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index d191343f941a..cabfc3eb652f 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -19,67 +19,44 @@ #ifndef INCLUDED_CUI_SOURCE_INC_ABOUT_HXX #define INCLUDED_CUI_SOURCE_INC_ABOUT_HXX -#include <vcl/accel.hxx> -#include <vcl/button.hxx> -#include <vcl/fixed.hxx> -#include <vcl/fixedhyper.hxx> -#include <vcl/vclmedit.hxx> -#include <sfx2/basedlgs.hxx> -#include <vector> +#include <vcl/weld.hxx> -// class AboutDialog ----------------------------------------------------- - -class AboutDialog : public SfxModalDialog +class AboutDialog : public weld::DialogController { private: - BitmapEx aBackgroundBitmap; - BitmapEx aLogoBitmap; + std::unique_ptr<weld::Builder> m_xBuilder; + std::shared_ptr<weld::AboutDialog> m_xDialog; + std::shared_ptr<weld::Container> m_xContentArea; - VclPtr<VclMultiLineEdit> m_pVersion; - VclPtr<FixedHyperlink> m_pBuildIdLink; - VclPtr<FixedText> m_pDescriptionText; - VclPtr<FixedText> m_pCopyrightText; - VclPtr<FixedImage> m_pLogoImage; - VclPtr<FixedText> m_pLogoReplacement; - VclPtr<PushButton> m_pCreditsButton; - VclPtr<PushButton> m_pWebsiteButton; - VclPtr<PushButton> m_pReleaseNotesButton; + BitmapEx aLogoBitmap; + BitmapEx aBackgroundBitmap; - OUString m_aVersionTextStr; - OUString m_aVendorTextStr; - OUString m_aCopyrightTextStr; - OUString m_aBasedTextStr; - OUString m_aBasedDerivedTextStr; - OUString m_aCreditsLinkStr; - OUString m_sBuildStr; - OUString m_aLocaleStr; - OUString m_aUILocaleStr; OUString m_buildIdLinkString; + weld::Button* m_pCreditsButton; + weld::Button* m_pWebsiteButton; + weld::Button* m_pReleaseNotesButton; + weld::Button* m_pCloseButton; + void SetBuildIdLink(); void StyleControls(); void SetLogo(); static OUString GetBuildId(); - OUString GetVersionString(); - OUString GetCopyrightString(); + static OUString GetVersionString(); + static OUString GetCopyrightString(); static OUString GetLocaleString(); static bool IsStringValidGitHash(const OUString& hash); -protected: - virtual bool Close() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; - virtual void Resize() override; - public: - AboutDialog(vcl::Window* pParent); + AboutDialog(weld::Window* pParent); + virtual weld::Dialog* getDialog() override { return m_xDialog.get(); } virtual ~AboutDialog() override; - virtual void dispose() override; - DECL_LINK( HandleClick, Button*, void ); + DECL_LINK(HandleClick, weld::Button&, void); + DECL_LINK(SizeAllocHdl, const Size&, void); }; #endif // INCLUDED_CUI_SOURCE_INC_ABOUT_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |