projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wide char tweaks, Features5 update, subtitle triple clk segv
[goodguy/history.git]
/
cinelerra-5.1
/
guicast
/
bcscrollbar.C
diff --git
a/cinelerra-5.1/guicast/bcscrollbar.C
b/cinelerra-5.1/guicast/bcscrollbar.C
index 5de4db6b79618a83d9bb3f79a3930e970c2b722e..389cacf8bf4b5e97f8117f8e19a3969dbc180334 100644
(file)
--- a/
cinelerra-5.1/guicast/bcscrollbar.C
+++ b/
cinelerra-5.1/guicast/bcscrollbar.C
@@
-23,18
+23,13
@@
#include "bcresources.h"
#include "bcscrollbar.h"
#include "clip.h"
#include "bcresources.h"
#include "bcscrollbar.h"
#include "clip.h"
-#include "colors.h"
+#include "
bc
colors.h"
#include "vframe.h"
#include <string.h>
#include "vframe.h"
#include <string.h>
-BC_ScrollBar::BC_ScrollBar(int x,
- int y,
- int orientation,
- int pixels,
- int64_t length,
- int64_t position,
- int64_t handlelength,
+BC_ScrollBar::BC_ScrollBar(int x, int y, int orientation, int pixels,
+ int64_t length, int64_t position, int64_t handlelength,
VFrame **data)
: BC_SubWindow(x, y, 0, 0, -1)
{
VFrame **data)
: BC_SubWindow(x, y, 0, 0, -1)
{
@@
-43,16
+38,15
@@
BC_ScrollBar::BC_ScrollBar(int x,
this->handlelength = handlelength;
this->selection_status = 0;
this->highlight_status = 0;
this->handlelength = handlelength;
this->selection_status = 0;
this->highlight_status = 0;
+ this->stretch = orientation & SCROLL_STRETCH ? 1 : 0;
+ orientation &= ~SCROLL_STRETCH;
this->orientation = orientation;
this->pixels = pixels;
this->orientation = orientation;
this->pixels = pixels;
- if(data)
- this->data = data;
- else
- if(orientation == SCROLL_HORIZ)
- this->data = BC_WindowBase::get_resources()->hscroll_data;
- else
- this->data = BC_WindowBase::get_resources()->vscroll_data;
+ if( !data ) data = orientation == SCROLL_HORIZ ?
+ BC_WindowBase::get_resources()->hscroll_data :
+ BC_WindowBase::get_resources()->vscroll_data ;
+ this->data = data;
handle_pixel = 0;
handle_pixels = 0;
handle_pixel = 0;
handle_pixels = 0;
@@
-90,8
+84,6
@@
void BC_ScrollBar::set_images(VFrame **data)
calculate_dimensions(w, h);
}
calculate_dimensions(w, h);
}
-
-
void BC_ScrollBar::calculate_dimensions(int &w, int &h)
{
switch(orientation)
void BC_ScrollBar::calculate_dimensions(int &w, int &h)
{
switch(orientation)
@@
-664,6
+656,7
@@
int BC_ScrollBar::update_value(int64_t value)
int BC_ScrollBar::update_length(int64_t length, int64_t position, int64_t handlelength, int flush)
{
int BC_ScrollBar::update_length(int64_t length, int64_t position, int64_t handlelength, int flush)
{
+ if( stretch ) length += handlelength/4;
this->length = length;
this->position = position;
this->handlelength = handlelength;
this->length = length;
this->position = position;
this->handlelength = handlelength;