Rebuilt Vector.glade - resizing works properly now.
This commit is contained in:
parent
b4f7e96158
commit
544b19da61
2 changed files with 45 additions and 37 deletions
11
src/vector.c
11
src/vector.c
|
@ -117,7 +117,6 @@ EVENT gboolean drawVectorImageDraw(GtkWidget *widget, cairo_t *cr, gpointer user
|
|||
int height = cairo_image_surface_get_height(self->surface);
|
||||
cairo_t *myCr;
|
||||
size_t offset;
|
||||
int blend;
|
||||
unsigned char *scaledPointer;
|
||||
unsigned char *tracePointer;
|
||||
unsigned char *targetPointer;
|
||||
|
@ -807,9 +806,13 @@ void winVectorCreate(void) {
|
|||
self->editor = scintilla_new();
|
||||
self->sci = SCINTILLA(self->editor);
|
||||
self->id = _nextEditorId++;
|
||||
gtk_container_add(GTK_CONTAINER(self->boxVectorForEditor), self->editor);
|
||||
scintilla_set_id(self->sci, self->id);
|
||||
gtk_widget_set_size_request(self->editor, 500, 300);
|
||||
gtk_widget_set_halign(self->editor, GTK_ALIGN_FILL);
|
||||
gtk_widget_set_valign(self->editor, GTK_ALIGN_FILL);
|
||||
gtk_widget_set_hexpand(self->editor, TRUE);
|
||||
gtk_widget_set_vexpand(self->editor, TRUE);
|
||||
gtk_box_set_child_packing(GTK_BOX(self->boxVectorForEditor), self->editor, TRUE, TRUE, 0, GTK_PACK_START);
|
||||
gtk_container_add(GTK_CONTAINER(self->boxVectorForEditor), self->editor);
|
||||
|
||||
// Configure editor.
|
||||
SSM(SCI_SETCODEPAGE, SC_CP_UTF8, 0);
|
||||
|
@ -830,6 +833,7 @@ void winVectorCreate(void) {
|
|||
SSM(SCI_SETCARETFORE, 0x00ffff, 0);
|
||||
SSM(SCI_STYLESETBACK, STYLE_LINENUMBER, 0x222222);
|
||||
|
||||
/*
|
||||
// Add "indent" (no language) lexer for basic folding support.
|
||||
self->pLexer = CreateLexer("cpp");
|
||||
SSM(SCI_SETILEXER, 0, (sptr_t)self->pLexer);
|
||||
|
@ -844,6 +848,7 @@ void winVectorCreate(void) {
|
|||
SSM(SCI_STYLESETFORE, SCE_C_WORD, 0xFF0000);
|
||||
SSM(SCI_STYLESETFORE, SCE_C_STRING, 0xFF00FF);
|
||||
SSM(SCI_STYLESETBOLD, SCE_C_OPERATOR, 1);
|
||||
*/
|
||||
|
||||
// Margin markers.
|
||||
SSM(SCI_MARKERDEFINE, MARKER_ERROR_ARROW, SC_MARK_SHORTARROW); // Error
|
||||
|
|
|
@ -2,12 +2,6 @@
|
|||
<!-- Generated with glade 3.40.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.24"/>
|
||||
<object class="GtkAdjustment" id="adjustmentVectorMainImage">
|
||||
<property name="upper">100</property>
|
||||
<property name="value">100</property>
|
||||
<property name="step-increment">1</property>
|
||||
<property name="page-increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustmentVectorTraceImage">
|
||||
<property name="upper">100</property>
|
||||
<property name="value">50</property>
|
||||
|
@ -18,15 +12,25 @@
|
|||
<patterns>
|
||||
<pattern>*.png</pattern>
|
||||
<pattern>*.jpg</pattern>
|
||||
<pattern>*.bmp</pattern>
|
||||
<pattern>*.jpeg</pattern>
|
||||
<pattern>*.bmp</pattern>
|
||||
<pattern>*.psd</pattern>
|
||||
<pattern>*.tga</pattern>
|
||||
<pattern>*.targa</pattern>
|
||||
<pattern>*.gif</pattern>
|
||||
<pattern>*.pic</pattern>
|
||||
<pattern>*.pnm</pattern>
|
||||
<pattern>*.ppm</pattern>
|
||||
<pattern>*.pgm</pattern>
|
||||
</patterns>
|
||||
</object>
|
||||
<object class="GtkWindow" id="winVector">
|
||||
<property name="width-request">1500</property>
|
||||
<property name="height-request">600</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="title" translatable="yes">Vector</property>
|
||||
<property name="default-width">800</property>
|
||||
<property name="default-height">500</property>
|
||||
<property name="default-width">1500</property>
|
||||
<property name="default-height">600</property>
|
||||
<signal name="delete-event" handler="winVectorClose" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
|
@ -60,7 +64,7 @@
|
|||
<object class="GtkMenuItem" id="menuVectorFileOpen">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">_Open</property>
|
||||
<property name="label" translatable="yes">_Open...</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -90,7 +94,7 @@
|
|||
<object class="GtkMenuItem" id="menuVectorFileClose">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">_Close</property>
|
||||
<property name="label" translatable="yes">C_lose</property>
|
||||
<property name="use-underline">True</property>
|
||||
<signal name="activate" handler="menuVectorFileClose" swapped="no"/>
|
||||
</object>
|
||||
|
@ -100,7 +104,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem">
|
||||
<object class="GtkMenuItem" id="menuVectorEdit">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">_Edit</property>
|
||||
|
@ -121,7 +125,7 @@
|
|||
<object class="GtkMenuItem" id="menuVectorEditCopy">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Copy</property>
|
||||
<property name="label" translatable="yes">_Copy</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -146,7 +150,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem">
|
||||
<object class="GtkMenuItem" id="menuVectorHelp">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">_Help</property>
|
||||
|
@ -175,27 +179,20 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="boxVectorForEditor">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="baseline-position">top</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="boxVectorImage">
|
||||
<property name="width-request">640</property>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="baseline-position">top</property>
|
||||
<child>
|
||||
<object class="GtkDrawingArea" id="drawVectorImage">
|
||||
<property name="width-request">640</property>
|
||||
<property name="height-request">400</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<signal name="draw" handler="drawVectorImageDraw" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -212,10 +209,8 @@
|
|||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="xpad">5</property>
|
||||
<property name="label" translatable="yes">Trace Opacity:</property>
|
||||
<property name="justify">right</property>
|
||||
<property name="single-line-mode">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -227,7 +222,6 @@
|
|||
<object class="GtkScale" id="scaleVectorTraceImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="adjustment">adjustmentVectorTraceImage</property>
|
||||
<property name="round-digits">0</property>
|
||||
<property name="digits">0</property>
|
||||
|
@ -235,9 +229,9 @@
|
|||
<signal name="value-changed" handler="scaleVectorTraceImageValueChanged" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -255,9 +249,8 @@
|
|||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="xpad">5</property>
|
||||
<property name="label" translatable="yes">Trace Image:</property>
|
||||
<property name="single-line-mode">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -269,7 +262,6 @@
|
|||
<object class="GtkFileChooserButton" id="fileVectorTraceImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="create-folders">False</property>
|
||||
<property name="filter">imageFilter</property>
|
||||
<property name="title" translatable="yes">Open Trace Image</property>
|
||||
<signal name="file-set" handler="fileVectorTraceImageFileSet" swapped="no"/>
|
||||
|
@ -295,7 +287,19 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkBox" id="boxVectorForEditor">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -307,5 +311,4 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkTextBuffer" id="textVectorBuffer"/>
|
||||
</interface>
|
||||
|
|
Loading…
Add table
Reference in a new issue