From f4048fca044a2988a43ab0038e46117a5c9e11ee Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Thu, 21 Jan 2021 23:02:50 +0100 Subject: [PATCH] Increased size of source icon --- DeviceSource.cpp | 3 ++- MediaSource.cpp | 5 +++-- NetworkSource.cpp | 4 ++-- PatternSource.cpp | 3 ++- SessionSource.cpp | 6 ++++-- Source.cpp | 12 +++++++++--- Source.h | 5 +++++ StreamSource.cpp | 3 ++- 8 files changed, 29 insertions(+), 12 deletions(-) diff --git a/DeviceSource.cpp b/DeviceSource.cpp index 4bab613..a3b638c 100644 --- a/DeviceSource.cpp +++ b/DeviceSource.cpp @@ -331,7 +331,8 @@ DeviceSource::DeviceSource() : StreamSource() stream_ = new Stream; // set symbol - symbol_ = new Symbol(Symbol::CAMERA, glm::vec3(0.8f, 0.8f, 0.01f)); + symbol_ = new Symbol(Symbol::CAMERA, glm::vec3(0.75f, 0.75f, 0.01f)); + symbol_->scale_.y = 1.5f; } DeviceSource::~DeviceSource() diff --git a/MediaSource.cpp b/MediaSource.cpp index 6524c29..631842d 100644 --- a/MediaSource.cpp +++ b/MediaSource.cpp @@ -79,9 +79,10 @@ void MediaSource::init() // icon in mixing view if (mediaplayer_->isImage()) - symbol_ = new Symbol(Symbol::IMAGE, glm::vec3(0.8f, 0.8f, 0.01f)); + symbol_ = new Symbol(Symbol::IMAGE, glm::vec3(0.75f, 0.75f, 0.01f)); else - symbol_ = new Symbol(Symbol::VIDEO, glm::vec3(0.8f, 0.8f, 0.01f)); + symbol_ = new Symbol(Symbol::VIDEO, glm::vec3(0.75f, 0.75f, 0.01f)); + symbol_->scale_.y = 1.5f; // set the renderbuffer of the source and attach rendering nodes attach(renderbuffer); diff --git a/NetworkSource.cpp b/NetworkSource.cpp index 212dd49..7915e24 100644 --- a/NetworkSource.cpp +++ b/NetworkSource.cpp @@ -274,8 +274,8 @@ NetworkSource::NetworkSource() : StreamSource() stream_ = (Stream *) new NetworkStream; // set symbol - symbol_ = new Symbol(Symbol::SHARE, glm::vec3(0.8f, 0.8f, 0.01f)); - + symbol_ = new Symbol(Symbol::SHARE, glm::vec3(0.75f, 0.75f, 0.01f)); + symbol_->scale_.y = 1.5f; } diff --git a/PatternSource.cpp b/PatternSource.cpp index 0f17654..92b66a3 100644 --- a/PatternSource.cpp +++ b/PatternSource.cpp @@ -137,7 +137,8 @@ PatternSource::PatternSource() : StreamSource() stream_ = (Stream *) new Pattern; // set symbol - symbol_ = new Symbol(Symbol::PATTERN, glm::vec3(0.8f, 0.8f, 0.01f)); + symbol_ = new Symbol(Symbol::PATTERN, glm::vec3(0.75f, 0.75f, 0.01f)); + symbol_->scale_.y = 1.5f; } void PatternSource::setPattern(uint type, glm::ivec2 resolution) diff --git a/SessionSource.cpp b/SessionSource.cpp index 214c290..cc8c847 100644 --- a/SessionSource.cpp +++ b/SessionSource.cpp @@ -48,7 +48,8 @@ SessionSource::SessionSource() : Source(), path_("") groups_[View::TRANSITION]->attach(overlays_[View::TRANSITION]); // set symbol - symbol_ = new Symbol(Symbol::SESSION, glm::vec3(0.8f, 0.8f, 0.01f)); + symbol_ = new Symbol(Symbol::SESSION, glm::vec3(0.75f, 0.75f, 0.01f)); + symbol_->scale_.y = 1.5f; failed_ = false; wait_for_sources_ = false; @@ -221,7 +222,8 @@ void SessionSource::accept(Visitor& v) RenderSource::RenderSource(Session *session) : Source(), session_(session) { // set symbol - symbol_ = new Symbol(Symbol::RENDER, glm::vec3(0.8f, 0.8f, 0.01f)); + symbol_ = new Symbol(Symbol::RENDER, glm::vec3(0.75f, 0.75f, 0.01f)); + symbol_->scale_.y = 1.5f; } diff --git a/Source.cpp b/Source.cpp index ed7957c..083dc20 100644 --- a/Source.cpp +++ b/Source.cpp @@ -440,9 +440,14 @@ void Source::setLocked (bool on) // the lock icon is visible when locked locker_->visible_ = on; - // a locked source is not visible in the GEOMETRY view (that's the whole point of it!) - groups_[View::GEOMETRY]->visible_ = !locked_; +} +void Source::setFixed (bool on) +{ + fixed_ = on; + + groups_[View::GEOMETRY]->visible_ = !fixed_; + groups_[View::MIXING]->visible_ = !fixed_; } @@ -677,7 +682,8 @@ CloneSource *Source::clone() CloneSource::CloneSource(Source *origin) : Source(), origin_(origin) { // set symbol - symbol_ = new Symbol(Symbol::CLONE, glm::vec3(0.8f, 0.8f, 0.01f)); + symbol_ = new Symbol(Symbol::CLONE, glm::vec3(0.75f, 0.75f, 0.01f)); + symbol_->scale_.y = 1.5f; } CloneSource::~CloneSource() diff --git a/Source.h b/Source.h index 105030b..78d1cbf 100644 --- a/Source.h +++ b/Source.h @@ -103,6 +103,10 @@ public: virtual void setLocked (bool on); inline bool locked () { return locked_; } + // lock mode + virtual void setFixed (bool on); + inline bool fixed () { return fixed_; } + // a Source shall informs if the source failed (i.e. shall be deleted) virtual bool failed () const = 0; @@ -205,6 +209,7 @@ protected: // update bool active_; bool locked_; + bool fixed_; bool need_update_; float dt_; Group *stored_status_; diff --git a/StreamSource.cpp b/StreamSource.cpp index 6128b85..611fd4b 100644 --- a/StreamSource.cpp +++ b/StreamSource.cpp @@ -18,7 +18,8 @@ GenericStreamSource::GenericStreamSource() : StreamSource() stream_ = new Stream; // set symbol - symbol_ = new Symbol(Symbol::EMPTY, glm::vec3(0.8f, 0.8f, 0.01f)); + symbol_ = new Symbol(Symbol::EMPTY, glm::vec3(0.75f, 0.75f, 0.01f)); + symbol_->scale_.y = 1.5f; } void GenericStreamSource::setDescription(const std::string &desc)