Skip to content

Commit 51e78a9

Browse files
committed
[eLabel]
* improve scroll text
1 parent 92f939b commit 51e78a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/gui/elabel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ int eLabel::event(int event, void* data, void* data2) {
9595
/* For horizontal scroll we need full text width, height = visibleH.
9696
For vertical scroll we need full text height, width = visibleW.
9797
For non-scrolling modes we keep the visible area. */
98-
if (m_scroll_config.direction == eScrollConfig::scrollLeft || m_scroll_config.direction == eScrollConfig::scrollRight) {
98+
if (m_scroll_text && (m_scroll_config.direction == eScrollConfig::scrollLeft || m_scroll_config.direction == eScrollConfig::scrollRight)) {
9999
rectW = m_text_size.width(); // full text width (no-wrap computed earlier)
100100
rectH = visibleH;
101-
} else if (m_scroll_config.direction == eScrollConfig::scrollTop || m_scroll_config.direction == eScrollConfig::scrollBottom) {
101+
} else if (m_scroll_text && (m_scroll_config.direction == eScrollConfig::scrollTop || m_scroll_config.direction == eScrollConfig::scrollBottom)) {
102102
rectW = visibleW;
103103
rectH = m_text_size.height(); // full text height (wrapped)
104104
} else {

0 commit comments

Comments
 (0)