mirror of https://github.com/GNOME/gimp.git
Had a look at making the window resizable, got scared. Made the palette
Sun Oct 4 22:18:11 BST 1998 Adam D. Moss <adam@gimp.org> * app/palette.c: Had a look at making the window resizable, got scared. Made the palette dialog a bit smaller. * app/indexed_palette.c: The window is now resizable without falling foul to previously existing bugs. It won't win you anything though.
This commit is contained in:
parent
0499488635
commit
06239a0c04
|
@ -1,3 +1,12 @@
|
|||
Sun Oct 4 22:18:11 BST 1998 Adam D. Moss <adam@gimp.org>
|
||||
|
||||
* app/palette.c: Had a look at making the window resizable,
|
||||
got scared. Made the palette dialog a bit smaller.
|
||||
|
||||
* app/indexed_palette.c: The window is now resizable without
|
||||
falling foul to previously existing bugs. It won't win you
|
||||
anything though.
|
||||
|
||||
Sun Oct 4 21:07:07 BST 1998 Adam D. Moss <adam@gimp.org>
|
||||
|
||||
* app/ink.c app/paint_core.c: The paint and ink tools
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
#include "palette.h"
|
||||
#include "session.h"
|
||||
|
||||
#define ENTRY_WIDTH 14
|
||||
#define ENTRY_WIDTH 12
|
||||
#define ENTRY_HEIGHT 10
|
||||
#define SPACING 1
|
||||
#define COLUMNS 16
|
||||
#define ROWS 16
|
||||
#define ROWS 11
|
||||
|
||||
#define PREVIEW_WIDTH ((ENTRY_WIDTH * COLUMNS) + (SPACING * (COLUMNS + 1)))
|
||||
#define PREVIEW_HEIGHT ((ENTRY_HEIGHT * ROWS) + (SPACING * (ROWS + 1)))
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
|
||||
#define EVENT_MASK GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK
|
||||
|
||||
#define CELL_WIDTH 20
|
||||
#define CELL_HEIGHT 20
|
||||
#define CELL_WIDTH 12
|
||||
#define CELL_HEIGHT 12
|
||||
#define P_AREA_WIDTH (CELL_WIDTH * 16)
|
||||
#define P_AREA_HEIGHT (CELL_HEIGHT * 16)
|
||||
|
||||
|
@ -119,6 +119,8 @@ indexed_palette_create (GimpImage* gimage)
|
|||
GtkWidget *menu_bar;
|
||||
GtkWidget *menu_bar_item;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *hbox2;
|
||||
GtkWidget *vbox2;
|
||||
GtkAccelGroup *accel_group;
|
||||
int default_index;
|
||||
|
||||
|
@ -132,7 +134,7 @@ indexed_palette_create (GimpImage* gimage)
|
|||
/* The shell and main vbox */
|
||||
indexedP->shell = gtk_dialog_new ();
|
||||
gtk_window_set_wmclass (GTK_WINDOW (indexedP->shell), "indexed_color_palette", "Gimp");
|
||||
gtk_window_set_policy (GTK_WINDOW (indexedP->shell), FALSE, FALSE, FALSE);
|
||||
gtk_window_set_policy (GTK_WINDOW (indexedP->shell), FALSE, TRUE, TRUE);
|
||||
gtk_window_set_title (GTK_WINDOW (indexedP->shell), "Indexed Color Palette");
|
||||
gtk_window_add_accel_group (GTK_WINDOW (indexedP->shell), accel_group);
|
||||
gtk_signal_connect (GTK_OBJECT (indexedP->shell), "delete_event",
|
||||
|
@ -184,12 +186,17 @@ indexed_palette_create (GimpImage* gimage)
|
|||
gtk_widget_show (menu_bar);
|
||||
gtk_widget_show (util_box);
|
||||
|
||||
vbox2 = gtk_vbox_new (TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), vbox2, TRUE, FALSE, 4);
|
||||
hbox2 = gtk_hbox_new (TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox2, TRUE, FALSE, 4);
|
||||
/* The palette frame */
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox2), frame, FALSE, FALSE, 2);
|
||||
indexedP->palette = gtk_preview_new (GTK_PREVIEW_COLOR);
|
||||
gtk_preview_size (GTK_PREVIEW (indexedP->palette), P_AREA_WIDTH, P_AREA_HEIGHT);
|
||||
gtk_preview_size (GTK_PREVIEW (indexedP->palette),
|
||||
P_AREA_WIDTH, P_AREA_HEIGHT);
|
||||
gtk_widget_set_events (indexedP->palette, EVENT_MASK);
|
||||
gtk_signal_connect (GTK_OBJECT (indexedP->palette), "event",
|
||||
(GtkSignalFunc) indexed_palette_area_events,
|
||||
|
@ -198,6 +205,8 @@ indexed_palette_create (GimpImage* gimage)
|
|||
|
||||
gtk_widget_show (indexedP->palette);
|
||||
gtk_widget_show (frame);
|
||||
gtk_widget_show (hbox2);
|
||||
gtk_widget_show (vbox2);
|
||||
|
||||
/* some helpful hints */
|
||||
hbox = gtk_hbox_new(FALSE, 1);
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
#include "palette.h"
|
||||
#include "session.h"
|
||||
|
||||
#define ENTRY_WIDTH 14
|
||||
#define ENTRY_WIDTH 12
|
||||
#define ENTRY_HEIGHT 10
|
||||
#define SPACING 1
|
||||
#define COLUMNS 16
|
||||
#define ROWS 16
|
||||
#define ROWS 11
|
||||
|
||||
#define PREVIEW_WIDTH ((ENTRY_WIDTH * COLUMNS) + (SPACING * (COLUMNS + 1)))
|
||||
#define PREVIEW_HEIGHT ((ENTRY_HEIGHT * ROWS) + (SPACING * (ROWS + 1)))
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
#include "palette.h"
|
||||
#include "session.h"
|
||||
|
||||
#define ENTRY_WIDTH 14
|
||||
#define ENTRY_WIDTH 12
|
||||
#define ENTRY_HEIGHT 10
|
||||
#define SPACING 1
|
||||
#define COLUMNS 16
|
||||
#define ROWS 16
|
||||
#define ROWS 11
|
||||
|
||||
#define PREVIEW_WIDTH ((ENTRY_WIDTH * COLUMNS) + (SPACING * (COLUMNS + 1)))
|
||||
#define PREVIEW_HEIGHT ((ENTRY_HEIGHT * ROWS) + (SPACING * (ROWS + 1)))
|
||||
|
|
Loading…
Reference in New Issue