mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
move scrollbar into its own box so it doesn't force buttons to be over-tall
This commit is contained in:
parent
afa496cb19
commit
e98ef5b962
1 changed files with 15 additions and 21 deletions
|
@ -962,7 +962,7 @@ gtk_util_yOffsetChange( XW_UtilCtxt* uc, XP_U16 oldOffset, XP_U16 newOffset )
|
||||||
GtkAppGlobals* globals = (GtkAppGlobals*)uc->closure;
|
GtkAppGlobals* globals = (GtkAppGlobals*)uc->closure;
|
||||||
board_invalAll( globals->cGlobals.game.board );
|
board_invalAll( globals->cGlobals.game.board );
|
||||||
/* board_draw( globals->board ); */
|
/* board_draw( globals->board ); */
|
||||||
} /* gtk_util_trayHiddenChange */
|
} /* gtk_util_yOffsetChange */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
printFinalScores( GtkAppGlobals* globals )
|
printFinalScores( GtkAppGlobals* globals )
|
||||||
|
@ -1313,7 +1313,6 @@ makeVerticalBar( GtkAppGlobals* globals, GtkWidget* window )
|
||||||
{
|
{
|
||||||
GtkWidget* vbox;
|
GtkWidget* vbox;
|
||||||
GtkWidget* button;
|
GtkWidget* button;
|
||||||
GtkWidget* vscrollbar;
|
|
||||||
|
|
||||||
vbox = gtk_vbutton_box_new();
|
vbox = gtk_vbutton_box_new();
|
||||||
|
|
||||||
|
@ -1337,17 +1336,6 @@ makeVerticalBar( GtkAppGlobals* globals, GtkWidget* window )
|
||||||
G_CALLBACK(handle_colors_button) );
|
G_CALLBACK(handle_colors_button) );
|
||||||
gtk_box_pack_start( GTK_BOX(vbox), button, FALSE, TRUE, 0 );
|
gtk_box_pack_start( GTK_BOX(vbox), button, FALSE, TRUE, 0 );
|
||||||
|
|
||||||
if ( globals->cGlobals.params->trayOverlaps ) {
|
|
||||||
globals->adjustment = (GtkAdjustment*)gtk_adjustment_new( 0, 0, 15,
|
|
||||||
1, 2, 13 );
|
|
||||||
vscrollbar = gtk_vscrollbar_new( globals->adjustment );
|
|
||||||
g_signal_connect( GTK_OBJECT(globals->adjustment), "value_changed",
|
|
||||||
G_CALLBACK(scroll_value_changed), globals );
|
|
||||||
|
|
||||||
gtk_widget_show( vscrollbar );
|
|
||||||
gtk_box_pack_start( GTK_BOX(vbox), vscrollbar, TRUE, TRUE, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* undo and redo buttons */
|
/* undo and redo buttons */
|
||||||
button = makeShowButtonFromBitmap( globals, "../undo.xpm", "u",
|
button = makeShowButtonFromBitmap( globals, "../undo.xpm", "u",
|
||||||
G_CALLBACK(handle_undo_button) );
|
G_CALLBACK(handle_undo_button) );
|
||||||
|
@ -1365,14 +1353,6 @@ makeVerticalBar( GtkAppGlobals* globals, GtkWidget* window )
|
||||||
G_CALLBACK(handle_trade_button) );
|
G_CALLBACK(handle_trade_button) );
|
||||||
gtk_box_pack_start( GTK_BOX(vbox), button, FALSE, TRUE, 0 );
|
gtk_box_pack_start( GTK_BOX(vbox), button, FALSE, TRUE, 0 );
|
||||||
|
|
||||||
button = makeShowButtonFromBitmap( globals, "../hide.xpm", "h",
|
|
||||||
G_CALLBACK(handle_hide_button) );
|
|
||||||
gtk_box_pack_start( GTK_BOX(vbox), button, FALSE, TRUE, 0 );
|
|
||||||
|
|
||||||
button = makeShowButtonFromBitmap( globals, "../hide.xpm", "d",
|
|
||||||
G_CALLBACK(handle_commit_button) );
|
|
||||||
gtk_box_pack_start( GTK_BOX(vbox), button, FALSE, TRUE, 0 );
|
|
||||||
|
|
||||||
gtk_widget_show( vbox );
|
gtk_widget_show( vbox );
|
||||||
return vbox;
|
return vbox;
|
||||||
} /* makeVerticalBar */
|
} /* makeVerticalBar */
|
||||||
|
@ -1622,6 +1602,20 @@ gtkmain( XP_Bool isServer, LaunchParams* params, int argc, char *argv[] )
|
||||||
|
|
||||||
hbox = gtk_hbox_new( FALSE, 0 );
|
hbox = gtk_hbox_new( FALSE, 0 );
|
||||||
gtk_box_pack_start( GTK_BOX (hbox), drawing_area, TRUE, TRUE, 0);
|
gtk_box_pack_start( GTK_BOX (hbox), drawing_area, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
if ( globals.cGlobals.params->trayOverlaps ) {
|
||||||
|
GtkWidget* vscrollbar;
|
||||||
|
globals.adjustment = (GtkAdjustment*)gtk_adjustment_new( 0, 0,
|
||||||
|
MAX_ROWS,
|
||||||
|
1, 2, 13 );
|
||||||
|
vscrollbar = gtk_vscrollbar_new( globals.adjustment );
|
||||||
|
g_signal_connect( GTK_OBJECT(globals.adjustment), "value_changed",
|
||||||
|
G_CALLBACK(scroll_value_changed), &globals );
|
||||||
|
|
||||||
|
gtk_widget_show( vscrollbar );
|
||||||
|
gtk_box_pack_start( GTK_BOX(hbox), vscrollbar, TRUE, TRUE, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
gtk_box_pack_start( GTK_BOX (hbox),
|
gtk_box_pack_start( GTK_BOX (hbox),
|
||||||
makeVerticalBar( &globals, window ),
|
makeVerticalBar( &globals, window ),
|
||||||
FALSE, TRUE, 0 );
|
FALSE, TRUE, 0 );
|
||||||
|
|
Loading…
Reference in a new issue