From 98d643868591ef9f9dd77e718398f6b6b9d098ae Mon Sep 17 00:00:00 2001 From: casey langen Date: Sat, 14 Jul 2018 16:08:33 -0700 Subject: [PATCH] Revert "A bit of A_BOLD experimentation. May revert." This reverts commit 1b7f02d02ed5620eee68280d5db1ef9a4ad7d96a. --- src/musikcube/app/window/TrackListView.cpp | 4 ++-- src/musikcube/app/window/TransportWindow.cpp | 5 +++-- src/musikcube/cursespp/ShortcutsWindow.cpp | 8 ++------ src/musikcube/cursespp/Window.cpp | 3 --- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/musikcube/app/window/TrackListView.cpp b/src/musikcube/app/window/TrackListView.cpp index 0da2555cb..03dfe74d2 100755 --- a/src/musikcube/app/window/TrackListView.cpp +++ b/src/musikcube/app/window/TrackListView.cpp @@ -418,8 +418,8 @@ IScrollAdapter::EntryPtr TrackListView::Adapter::GetEntry(cursespp::ScrollableWi TrackListEntry(album, trackIndex, RowType::Separator)); entry->SetAttrs(selected - ? COLOR_PAIR(CURSESPP_LIST_ITEM_HIGHLIGHTED_HEADER) | A_BOLD - : COLOR_PAIR(CURSESPP_LIST_ITEM_HEADER) | A_BOLD); + ? COLOR_PAIR(CURSESPP_LIST_ITEM_HIGHLIGHTED_HEADER) + : COLOR_PAIR(CURSESPP_LIST_ITEM_HEADER)); return entry; } diff --git a/src/musikcube/app/window/TransportWindow.cpp b/src/musikcube/app/window/TransportWindow.cpp index 92727fbc9..9317b7cf7 100755 --- a/src/musikcube/app/window/TransportWindow.cpp +++ b/src/musikcube/app/window/TransportWindow.cpp @@ -236,7 +236,7 @@ static size_t writePlayingFormat( tokenize(Strings.PLAYING_FORMAT, tokens); int64_t dim = COLOR_PAIR(CURSESPP_TEXT_DISABLED); - int64_t gb = COLOR_PAIR(CURSESPP_TEXT_ACTIVE) | A_BOLD; + int64_t gb = COLOR_PAIR(CURSESPP_TEXT_ACTIVE); size_t remaining = width; auto it = tokens.begin(); @@ -532,8 +532,9 @@ void TransportWindow::Update(TimeMode timeMode) { bool muted = transport.IsMuted(); bool replayGainEnabled = (this->replayGainMode != ReplayGainMode::Disabled); - int64_t gb = COLOR_PAIR(CURSESPP_TEXT_ACTIVE) | A_BOLD; + int64_t gb = COLOR_PAIR(CURSESPP_TEXT_ACTIVE); int64_t disabled = COLOR_PAIR(CURSESPP_TEXT_DISABLED); + int64_t bright = COLOR_PAIR(CURSESPP_TEXT_DEFAULT); int64_t volumeAttrs = CURSESPP_DEFAULT_COLOR; if (this->focus == FocusVolume) { diff --git a/src/musikcube/cursespp/ShortcutsWindow.cpp b/src/musikcube/cursespp/ShortcutsWindow.cpp index 16b25e7d7..4ee527708 100755 --- a/src/musikcube/cursespp/ShortcutsWindow.cpp +++ b/src/musikcube/cursespp/ShortcutsWindow.cpp @@ -196,7 +196,7 @@ void ShortcutsWindow::OnRedraw() { this->Clear(); int64_t normalAttrs = COLOR_PAIR(CURSESPP_BUTTON_NORMAL); - int64_t activeAttrs = COLOR_PAIR(CURSESPP_BUTTON_HIGHLIGHTED) | A_BOLD; + int64_t activeAttrs = COLOR_PAIR(CURSESPP_BUTTON_HIGHLIGHTED); WINDOW* c = this->GetContent(); @@ -207,10 +207,9 @@ void ShortcutsWindow::OnRedraw() { size_t remaining = this->GetContentWidth(); for (size_t i = 0; i < this->entries.size() && remaining > 0; i++) { auto e = this->entries[i]; - auto isActive = (e->key == this->activeKey); int64_t keyAttrs = (e->attrs == -1) ? normalAttrs : COLOR_PAIR(e->attrs); - keyAttrs = isActive ? activeAttrs : keyAttrs; + keyAttrs = (e->key == this->activeKey) ? activeAttrs : keyAttrs; checked_wprintw(c, " "); --remaining; @@ -253,10 +252,7 @@ void ShortcutsWindow::OnRedraw() { len = remaining; } - if (isActive) { wattron(c, A_BOLD); } checked_wprintw(c, value.c_str()); - if (isActive) { wattroff(c, A_BOLD); } - remaining -= len; } } diff --git a/src/musikcube/cursespp/Window.cpp b/src/musikcube/cursespp/Window.cpp index 4cefffabd..66b736b78 100755 --- a/src/musikcube/cursespp/Window.cpp +++ b/src/musikcube/cursespp/Window.cpp @@ -413,10 +413,7 @@ void Window::DrawFrameAndTitle() { if (max > 3) { /* 3 = first character plus ellipse (e.g. 'F..')*/ std::string adjusted = " " + text::Ellipsize(this->title, (size_t) max - 2) + " "; wmove(this->frame, 0, 2); - bool focused = IsFocused(); - if (focused) { wattron(this->frame, A_BOLD); } checked_waddstr(this->frame, adjusted.c_str()); - if (focused) { wattroff(this->frame, A_BOLD); } } }