Skip to content

Commit d803c74

Browse files
committed
better initial image size
1 parent 619f817 commit d803c74

File tree

3 files changed

+149
-177
lines changed

3 files changed

+149
-177
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,6 @@ then check the build status here:
237237

238238
## TODO
239239

240-
- prop position should be distance from right edge, not left edge
241-
242-
and improve the default position ... should be the width of the
243-
properties widget
244-
245240
- on props hide, force kb focus to imagedisplay?
246241

247242
how can we tell if a child of $widget has the focus?

src/animatedpane.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
*/
32
#define DEBUG
3+
*/
44

55
#include "vipsdisp.h"
66

@@ -116,8 +116,10 @@ animatedpaned_set_child_position( Animatedpane *animatedpane, int position )
116116
{
117117
// our position is distance from the right edge -- we must swap this
118118
int widget_width = gtk_widget_get_width( GTK_WIDGET( animatedpane ) );
119-
int paned_position = widget_width - position;
120-
119+
// widget_width will be zero on startup and we want the thing to come in
120+
// from the right, so we need a large value
121+
int paned_position = widget_width == 0 ? 10000 : widget_width - position;
122+
121123
gtk_paned_set_position( GTK_PANED( animatedpane->paned ),
122124
paned_position );
123125
}

0 commit comments

Comments
 (0)