diff options
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | unity-shared/CoverArt.cpp | 4 | ||||
| -rw-r--r-- | unity-shared/CoverArt.h | 2 | ||||
| -rw-r--r-- | unity-shared/SearchBar.cpp | 6 | ||||
| -rw-r--r-- | unity-shared/SearchBar.h | 4 | ||||
| -rw-r--r-- | unity-shared/StaticCairoText.cpp | 7 | ||||
| -rw-r--r-- | unity-shared/StaticCairoText.h | 16 | ||||
| -rw-r--r-- | unity-shared/TextInput.cpp | 2 | ||||
| -rw-r--r-- | unity-shared/TextInput.h | 2 |
9 files changed, 20 insertions, 25 deletions
diff --git a/unity-shared/CMakeLists.txt b/unity-shared/CMakeLists.txt index ba099aeee..408a5fd0a 100644 --- a/unity-shared/CMakeLists.txt +++ b/unity-shared/CMakeLists.txt @@ -1,7 +1,5 @@ set(UNITY_SRC ../plugins/unityshell/src) -find_package (PkgConfig) - set (CFLAGS ${CACHED_UNITY_DEPS_CFLAGS} ${CACHED_UNITY_DEPS_CFLAGS_OTHER} diff --git a/unity-shared/CoverArt.cpp b/unity-shared/CoverArt.cpp index 64fe9d8a1..97375a6c2 100644 --- a/unity-shared/CoverArt.cpp +++ b/unity-shared/CoverArt.cpp @@ -441,9 +441,9 @@ void CoverArt::SetupViews() layout->AddSpace(0, 1); SetLayout(layout); - overlay_text_ = new nux::StaticCairoText("", NUX_TRACKER_LOCATION); + overlay_text_ = new StaticCairoText("", NUX_TRACKER_LOCATION); overlay_text_->Reference(); - overlay_text_->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_CENTRE); + overlay_text_->SetTextAlignment(StaticCairoText::NUX_ALIGN_CENTRE); overlay_text_->SetFont("Ubuntu 14"); overlay_text_->SetLines(-3); overlay_text_->SetText("No Image Available"); diff --git a/unity-shared/CoverArt.h b/unity-shared/CoverArt.h index 592eec2b9..76303cce5 100644 --- a/unity-shared/CoverArt.h +++ b/unity-shared/CoverArt.h @@ -81,7 +81,7 @@ protected: private: nux::ObjectPtr<nux::BaseTexture> texture_screenshot_; - nux::StaticCairoText* overlay_text_; + StaticCairoText* overlay_text_; std::string image_hint_; unsigned int thumb_handle_; diff --git a/unity-shared/SearchBar.cpp b/unity-shared/SearchBar.cpp index 744f83ee2..bb6b8c15f 100644 --- a/unity-shared/SearchBar.cpp +++ b/unity-shared/SearchBar.cpp @@ -158,7 +158,7 @@ void SearchBar::Init() nux::HLayout* hint_layout = new nux::HLayout(NUX_TRACKER_LOCATION); - hint_ = new nux::StaticCairoText(" "); + hint_ = new StaticCairoText(" "); hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f)); hint_->SetFont(HINT_LABEL_DEFAULT_FONT.c_str()); hint_layout->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); @@ -182,11 +182,11 @@ void SearchBar::Init() if (show_filter_hint_) { std::string filter_str(_("Filter results")); - show_filters_ = new nux::StaticCairoText(filter_str); + show_filters_ = new StaticCairoText(filter_str); show_filters_->SetVisible(false); show_filters_->SetFont(SHOW_FILTERS_LABEL_DEFAULT_FONT.c_str()); show_filters_->SetTextColor(nux::color::White); - show_filters_->SetTextAlignment(nux::StaticCairoText::NUX_ALIGN_RIGHT); + show_filters_->SetTextAlignment(StaticCairoText::NUX_ALIGN_RIGHT); show_filters_->SetLines(1); nux::BaseTexture* arrow; diff --git a/unity-shared/SearchBar.h b/unity-shared/SearchBar.h index 130ffe7da..8095f8348 100644 --- a/unity-shared/SearchBar.h +++ b/unity-shared/SearchBar.h @@ -106,12 +106,12 @@ private: nux::HLayout* layout_; nux::HLayout* entry_layout_; nux::LayeredLayout* layered_layout_; - nux::StaticCairoText* hint_; + StaticCairoText* hint_; nux::LinearLayout* expander_layout_; IMTextEntry* pango_entry_; nux::View* expander_view_; nux::HLayout* filter_layout_; - nux::StaticCairoText* show_filters_; + StaticCairoText* show_filters_; nux::VLayout* arrow_layout_; nux::SpaceLayout* arrow_top_space_; nux::SpaceLayout* arrow_bottom_space_; diff --git a/unity-shared/StaticCairoText.cpp b/unity-shared/StaticCairoText.cpp index b28da7a7d..a30743abc 100644 --- a/unity-shared/StaticCairoText.cpp +++ b/unity-shared/StaticCairoText.cpp @@ -37,12 +37,9 @@ #include "CairoTexture.h" -using namespace unity; +using namespace nux; -// TODO: Tim Penhey 2011-05-16 -// We shouldn't be pushing stuff into the nux namespace from the unity -// codebase, that is just rude. -namespace nux +namespace unity { struct StaticCairoText::Impl { diff --git a/unity-shared/StaticCairoText.h b/unity-shared/StaticCairoText.h index 91549e7f6..38c57d4b2 100644 --- a/unity-shared/StaticCairoText.h +++ b/unity-shared/StaticCairoText.h @@ -26,13 +26,13 @@ #include <Nux/Nux.h> #include <Nux/View.h> -namespace nux +namespace unity { class Validator; -class StaticCairoText : public View +class StaticCairoText : public nux::View { - NUX_DECLARE_OBJECT_TYPE (StaticCairoText, View); + NUX_DECLARE_OBJECT_TYPE (StaticCairoText, nux::View); public: enum EllipsizeState { @@ -67,16 +67,16 @@ public: long PostLayoutManagement(long layoutResult); - void Draw(GraphicsEngine& gfxContext, + void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw); - void DrawContent(GraphicsEngine& gfxContext, + void DrawContent(nux::GraphicsEngine& gfxContext, bool forceDraw); // public API void SetText(std::string const& text, bool escape_text = false); void SetTextAlpha(unsigned int alpha); - void SetTextColor(Color const& textColor); + void SetTextColor(nux::Color const& textColor); void SetTextEllipsize(EllipsizeState state); void SetTextAlignment(AlignState state); void SetTextVerticalAlignment(AlignState state); @@ -87,13 +87,13 @@ public: void SetLineSpacing(float line_spacing); std::string GetText() const; - Color GetTextColor() const; + nux::Color GetTextColor() const; int GetLineCount() const; int GetBaseline() const; void GetTextExtents(int& width, int& height) const; - Size GetTextExtents() const; + nux::Size GetTextExtents() const; sigc::signal<void, StaticCairoText*> sigTextChanged; sigc::signal<void, StaticCairoText*> sigTextColorChanged; diff --git a/unity-shared/TextInput.cpp b/unity-shared/TextInput.cpp index 24ee13337..8a1929449 100644 --- a/unity-shared/TextInput.cpp +++ b/unity-shared/TextInput.cpp @@ -66,7 +66,7 @@ void TextInput::Init() nux::HLayout* hint_layout = new nux::HLayout(NUX_TRACKER_LOCATION); - hint_ = new nux::StaticCairoText(" "); + hint_ = new StaticCairoText(" "); hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f)); hint_->SetFont(HINT_LABEL_DEFAULT_FONT.c_str()); hint_layout->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); diff --git a/unity-shared/TextInput.h b/unity-shared/TextInput.h index 57a6e585f..53de7c099 100644 --- a/unity-shared/TextInput.h +++ b/unity-shared/TextInput.h @@ -94,7 +94,7 @@ protected: bool get_im_preedit() const; // instance vars - nux::StaticCairoText* hint_; + StaticCairoText* hint_; IMTextEntry* pango_entry_; private: |
