summaryrefslogtreecommitdiffstats
path: root/Panel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2006-07-23 22:45:24 +0000
committerHisham Muhammad <hisham@gobolinux.org>2006-07-23 22:45:24 +0000
commit2ecf199cf70d24e1ac359640c21cc79a81b68461 (patch)
tree649cb393525772a260525fd58c33fa8d359ad624 /Panel.c
parenteb2803ce79604b45c070edbe1e787f4373949cfe (diff)
Horizontally scroll in larger increments when on the
Linux console because of slow update of unaccelerated fb
Diffstat (limited to 'Panel.c')
-rw-r--r--Panel.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Panel.c b/Panel.c
index f014fca7..8c1bf560 100644
--- a/Panel.c
+++ b/Panel.c
@@ -40,6 +40,7 @@ struct Panel_ {
Vector* items;
int selected;
int scrollV, scrollH;
+ int scrollHAmount;
int oldSelected;
bool needsRedraw;
RichString header;
@@ -92,6 +93,10 @@ void Panel_init(Panel* this, int x, int y, int w, int h, char* type, bool owner)
this->oldSelected = 0;
this->needsRedraw = true;
this->header.len = 0;
+ if (String_eq(CRT_termType, "linux"))
+ this->scrollHAmount = 40;
+ else
+ this->scrollHAmount = 5;
}
void Panel_done(Panel* this) {
@@ -327,12 +332,12 @@ void Panel_onKey(Panel* this, int key) {
break;
case KEY_LEFT:
if (this->scrollH > 0) {
- this->scrollH -= 5;
+ this->scrollH -= this->scrollHAmount;
this->needsRedraw = true;
}
break;
case KEY_RIGHT:
- this->scrollH += 5;
+ this->scrollH += this->scrollHAmount;
this->needsRedraw = true;
break;
case KEY_PPAGE:

© 2014-2024 Faster IT GmbH | imprint | privacy policy