Compare commits
9 Commits
v1.0-1
...
0ecc60d2a1
Author | SHA1 | Date | |
---|---|---|---|
0ecc60d2a1 | |||
082a823575 | |||
1f7f3118fa | |||
5cfd93c18d | |||
6818357f64 | |||
b0fdb261e0 | |||
de8d6967c6 | |||
493f787fd1 | |||
a7b7ba71e5 |
@@ -6,7 +6,7 @@ pkg_search_module(GLIB REQUIRED glib-2.0)
|
|||||||
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
||||||
pkg_check_modules(CAIRO REQUIRED cairo)
|
pkg_check_modules(CAIRO REQUIRED cairo)
|
||||||
|
|
||||||
add_subdirectory(glade)
|
add_subdirectory(resources)
|
||||||
add_subdirectory(doxygen)
|
add_subdirectory(doxygen)
|
||||||
add_subdirectory(version)
|
add_subdirectory(version)
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@ set(SOURCE
|
|||||||
|
|
||||||
add_compile_options(-Wall)
|
add_compile_options(-Wall)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c)
|
add_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c)
|
||||||
add_dependencies(${PROJECT_NAME} glib-resources)
|
add_dependencies(${PROJECT_NAME} glib-resources)
|
||||||
add_dependencies(${PROJECT_NAME} version)
|
add_dependencies(${PROJECT_NAME} version)
|
||||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c PROPERTIES GENERATED 1)
|
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c PROPERTIES GENERATED 1)
|
||||||
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m version ${CMAKE_DL_LIBS})
|
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m version ${CMAKE_DL_LIBS})
|
||||||
install (TARGETS ${PROJECT_NAME} DESTINATION bin)
|
install (TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
|
|
||||||
|
@@ -234,7 +234,7 @@ SEPARATE_MEMBER_PAGES = NO
|
|||||||
# uses this value to replace tabs by spaces in code fragments.
|
# uses this value to replace tabs by spaces in code fragments.
|
||||||
# Minimum value: 1, maximum value: 16, default value: 4.
|
# Minimum value: 1, maximum value: 16, default value: 4.
|
||||||
|
|
||||||
TAB_SIZE = 4
|
TAB_SIZE = 8
|
||||||
|
|
||||||
# This tag can be used to specify a number of aliases that act as commands in
|
# This tag can be used to specify a number of aliases that act as commands in
|
||||||
# the documentation. An alias has the form:
|
# the documentation. An alias has the form:
|
||||||
|
@@ -485,7 +485,7 @@ static void gds_render_gui_init(GdsRenderGui *self)
|
|||||||
GtkWidget *sort_up_button;
|
GtkWidget *sort_up_button;
|
||||||
GtkWidget *sort_down_button;
|
GtkWidget *sort_down_button;
|
||||||
|
|
||||||
main_builder = gtk_builder_new_from_resource("/main.glade");
|
main_builder = gtk_builder_new_from_resource("/gui/main.glade");
|
||||||
|
|
||||||
self->cell_tree_view = GTK_TREE_VIEW(gtk_builder_get_object(main_builder, "cell-tree"));
|
self->cell_tree_view = GTK_TREE_VIEW(gtk_builder_get_object(main_builder, "cell-tree"));
|
||||||
self->cell_search_entry = GTK_WIDGET(gtk_builder_get_object(main_builder, "cell-search"));
|
self->cell_search_entry = GTK_WIDGET(gtk_builder_get_object(main_builder, "cell-search"));
|
||||||
|
@@ -176,16 +176,6 @@ int gds_tree_check_reference_loops(struct gds_library *lib)
|
|||||||
/* iterate through references and check if loop exists */
|
/* iterate through references and check if loop exists */
|
||||||
res = gds_tree_check_iterate_ref_and_check(cell_to_check, &visited_cells);
|
res = gds_tree_check_iterate_ref_and_check(cell_to_check, &visited_cells);
|
||||||
|
|
||||||
if (visited_cells) {
|
|
||||||
/* If cell contains no loop, print error when list not empty.
|
|
||||||
* In case of a loop, it is completely normal that the list is not empty,
|
|
||||||
* due to the instant return from gds_tree_check_iterate_ref_and_check()
|
|
||||||
*/
|
|
||||||
if (res == 0)
|
|
||||||
fprintf(stderr, "Visited cell list should be empty. This is a bug. Please report this.\n");
|
|
||||||
g_list_free(visited_cells);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
/* Error */
|
/* Error */
|
||||||
return res;
|
return res;
|
||||||
@@ -200,6 +190,10 @@ int gds_tree_check_reference_loops(struct gds_library *lib)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (visited_cells) {
|
||||||
|
fprintf(stderr, "Visited cell list should be empty. This is a bug. Please report this.\n");
|
||||||
|
g_list_free(visited_cells);
|
||||||
|
}
|
||||||
|
|
||||||
return loop_count;
|
return loop_count;
|
||||||
}
|
}
|
||||||
|
@@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<gresources>
|
|
||||||
<gresource prefix="/">
|
|
||||||
<file compressed="true">main.glade</file>
|
|
||||||
<file compressed="true">about.glade</file>
|
|
||||||
<file>layer-widget.glade</file>
|
|
||||||
<file>dialog.glade</file>
|
|
||||||
<file compressed="true" alias="logo.svg">../icon/gds-render.svg</file>
|
|
||||||
</gresource>
|
|
||||||
</gresources>
|
|
||||||
|
|
||||||
|
|
70
include/gds-render/layer/color-palette.h
Normal file
70
include/gds-render/layer/color-palette.h
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* GDSII-Converter
|
||||||
|
* Copyright (C) 2019 Mario Hüttel <mario.huettel@gmx.net>
|
||||||
|
*
|
||||||
|
* This file is part of GDSII-Converter.
|
||||||
|
*
|
||||||
|
* GDSII-Converter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* GDSII-Converter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file color-palette.h
|
||||||
|
* @brief Class representing a color palette
|
||||||
|
* @author Mario Hüttel <mario.huettel@gmx.net>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _COLOR_PALETTE_H_
|
||||||
|
#define _COLOR_PALETTE_H_
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
G_DECLARE_FINAL_TYPE(ColorPalette, color_palette, GDS_RENDER, COLOR_PALETTE, GObject);
|
||||||
|
|
||||||
|
#define TYPE_GDS_RENDER_COLOR_PALETTE (color_palette_get_type())
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Create a new object with from a resource containing the html hex color scheme
|
||||||
|
* @param resource_name Name of the resource
|
||||||
|
* @return New object
|
||||||
|
*/
|
||||||
|
ColorPalette *color_palette_new_from_resource(char *resource_name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the n-th color in the palette identified by the index.
|
||||||
|
*
|
||||||
|
* This function fills the nth color into the supplied \p color.
|
||||||
|
* \p color is returned.
|
||||||
|
*
|
||||||
|
* If \p color is NULL, a new GdkRGBA is created and returned.
|
||||||
|
* This element must be freed afterwards.
|
||||||
|
*
|
||||||
|
* @param palette Color palette
|
||||||
|
* @param color GdkRGBA struct to fill data in. May be NULL.
|
||||||
|
* @param index Index of color. Starts at 0
|
||||||
|
* @return GdkRGBA color. If \p color is NULL, the returned color must be freed afterwards
|
||||||
|
*/
|
||||||
|
GdkRGBA *color_palette_get_color(ColorPalette *palette, GdkRGBA *color, unsigned int index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return amount of stored colors in \p palette
|
||||||
|
* @param palette Color palette
|
||||||
|
* @return Count of colors
|
||||||
|
*/
|
||||||
|
unsigned int color_palette_get_color_count(ColorPalette *palette);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* _COLOR_PALETTE_H_ */
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @file layer-element.h
|
* @file layer-element.h
|
||||||
* @brief Omplementation of the layer element used for configuring layer colors etc.
|
* @brief Implementation of the layer element used for configuring layer colors etc.
|
||||||
* @author Mario Hüttel <mario.huettel@gmx.net>
|
* @author Mario Hüttel <mario.huettel@gmx.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
123
layer/color-palette.c
Normal file
123
layer/color-palette.c
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
/*
|
||||||
|
* GDSII-Converter
|
||||||
|
* Copyright (C) 2019 Mario Hüttel <mario.huettel@gmx.net>
|
||||||
|
*
|
||||||
|
* This file is part of GDSII-Converter.
|
||||||
|
*
|
||||||
|
* GDSII-Converter is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* GDSII-Converter is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file color-palette.c
|
||||||
|
* @brief Class representing a color palette
|
||||||
|
* @author Mario Hüttel <mario.huettel@gmx.net>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <gds-render/layer/color-palette.h>
|
||||||
|
|
||||||
|
struct _ColorPalette {
|
||||||
|
/* Inheritance */
|
||||||
|
GObject parent;
|
||||||
|
|
||||||
|
/* Custom fields */
|
||||||
|
/** @brief The internal array to store the colors */
|
||||||
|
GdkRGBA *color_array;
|
||||||
|
/** @brief The length of the _ColorPalette::color_array array */
|
||||||
|
unsigned int color_array_length;
|
||||||
|
|
||||||
|
gpointer dummy[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE(ColorPalette, color_palette, G_TYPE_OBJECT)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief color_palette_fill_with_resource
|
||||||
|
* @param palette
|
||||||
|
* @param resource_name
|
||||||
|
* @return 0 if successful
|
||||||
|
*/
|
||||||
|
static int color_palette_fill_with_resource(ColorPalette *palette, char *resource_name)
|
||||||
|
{
|
||||||
|
GBytes *data;
|
||||||
|
char *char_array;
|
||||||
|
|
||||||
|
if (!palette || !resource_name)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
data = g_resources_lookup_data(resource_name, 0, NULL);
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
return -2;
|
||||||
|
|
||||||
|
|
||||||
|
g_bytes_unref(data);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorPalette *color_palette_new_from_resource(char *resource_name)
|
||||||
|
{
|
||||||
|
ColorPalette *palette;
|
||||||
|
|
||||||
|
palette = GDS_RENDER_COLOR_PALETTE(g_object_new(TYPE_GDS_RENDER_COLOR_PALETTE, NULL));
|
||||||
|
if (palette)
|
||||||
|
(void)color_palette_fill_with_resource(palette, resource_name);
|
||||||
|
|
||||||
|
return palette;
|
||||||
|
}
|
||||||
|
|
||||||
|
GdkRGBA *color_palette_get_color(ColorPalette *palette, GdkRGBA *color, unsigned int index)
|
||||||
|
{
|
||||||
|
GdkRGBA *c = NULL;
|
||||||
|
|
||||||
|
if (!palette)
|
||||||
|
goto ret_c;
|
||||||
|
|
||||||
|
if (index >= palette->color_array_length)
|
||||||
|
goto ret_c;
|
||||||
|
|
||||||
|
if (color)
|
||||||
|
c = color;
|
||||||
|
else
|
||||||
|
c = (GdkRGBA *)malloc(sizeof(GdkRGBA));
|
||||||
|
|
||||||
|
/* Copy color */
|
||||||
|
c->red = palette->color_array[index].red;
|
||||||
|
c->green = palette->color_array[index].green;
|
||||||
|
c->blue = palette->color_array[index].blue;
|
||||||
|
c->alpha = palette->color_array[index].alpha;
|
||||||
|
ret_c:
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int color_palette_get_color_count(ColorPalette *palette)
|
||||||
|
{
|
||||||
|
unsigned int return_val = 0;
|
||||||
|
|
||||||
|
if (palette)
|
||||||
|
return_val = palette->color_array_length;
|
||||||
|
|
||||||
|
return return_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void color_palette_class_init(ColorPaletteClass *klass)
|
||||||
|
{
|
||||||
|
/* Nothing to do for now */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void color_palette_init(ColorPalette *self)
|
||||||
|
{
|
||||||
|
self->color_array = NULL;
|
||||||
|
self->color_array_length = 0;
|
||||||
|
}
|
4
main.c
4
main.c
@@ -90,13 +90,13 @@ static void app_about(GSimpleAction *action, GVariant *parameter, gpointer user_
|
|||||||
(void)action;
|
(void)action;
|
||||||
(void)parameter;
|
(void)parameter;
|
||||||
|
|
||||||
builder = gtk_builder_new_from_resource("/about.glade");
|
builder = gtk_builder_new_from_resource("/gui/about.glade");
|
||||||
dialog = GTK_DIALOG(gtk_builder_get_object(builder, "about-dialog"));
|
dialog = GTK_DIALOG(gtk_builder_get_object(builder, "about-dialog"));
|
||||||
gtk_window_set_transient_for(GTK_WINDOW(dialog), NULL);
|
gtk_window_set_transient_for(GTK_WINDOW(dialog), NULL);
|
||||||
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), _app_version_string);
|
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), _app_version_string);
|
||||||
|
|
||||||
/* Load icon from resource */
|
/* Load icon from resource */
|
||||||
logo_buf = gdk_pixbuf_new_from_resource_at_scale("/logo.svg", 100, 100, TRUE, &error);
|
logo_buf = gdk_pixbuf_new_from_resource_at_scale("/images/logo.svg", 100, 100, TRUE, &error);
|
||||||
if (logo_buf) {
|
if (logo_buf) {
|
||||||
/* Set logo */
|
/* Set logo */
|
||||||
gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), logo_buf);
|
gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), logo_buf);
|
||||||
|
@@ -2,6 +2,7 @@ add_custom_target(glib-resources DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/resources.c
|
|||||||
add_custom_command(DEPENDS
|
add_custom_command(DEPENDS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.glade
|
${CMAKE_CURRENT_SOURCE_DIR}/*.glade
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/resources.xml
|
${CMAKE_CURRENT_SOURCE_DIR}/resources.xml
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/color-palette.txt
|
||||||
OUTPUT
|
OUTPUT
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/resources.c
|
${CMAKE_CURRENT_BINARY_DIR}/resources.c
|
||||||
COMMAND
|
COMMAND
|
255
resources/color-palette.txt
Normal file
255
resources/color-palette.txt
Normal file
@@ -0,0 +1,255 @@
|
|||||||
|
800000
|
||||||
|
008000
|
||||||
|
808000
|
||||||
|
000080
|
||||||
|
800080
|
||||||
|
008080
|
||||||
|
c0c0c0
|
||||||
|
808080
|
||||||
|
ff0000
|
||||||
|
00ff00
|
||||||
|
ffff00
|
||||||
|
0000ff
|
||||||
|
ff00ff
|
||||||
|
00ffff
|
||||||
|
f105f5
|
||||||
|
000000
|
||||||
|
00005f
|
||||||
|
000087
|
||||||
|
0000af
|
||||||
|
0000d7
|
||||||
|
0000ff
|
||||||
|
005f00
|
||||||
|
005f5f
|
||||||
|
005f87
|
||||||
|
005faf
|
||||||
|
005fd7
|
||||||
|
005fff
|
||||||
|
008700
|
||||||
|
00875f
|
||||||
|
008787
|
||||||
|
0087af
|
||||||
|
0087d7
|
||||||
|
0087ff
|
||||||
|
00af00
|
||||||
|
00af5f
|
||||||
|
00af87
|
||||||
|
00afaf
|
||||||
|
00afd7
|
||||||
|
00afff
|
||||||
|
00d700
|
||||||
|
00d75f
|
||||||
|
00d787
|
||||||
|
00d7af
|
||||||
|
00d7d7
|
||||||
|
00d7ff
|
||||||
|
00ff00
|
||||||
|
00ff5f
|
||||||
|
00ff87
|
||||||
|
00ffaf
|
||||||
|
00ffd7
|
||||||
|
00ffff
|
||||||
|
5f0000
|
||||||
|
5f005f
|
||||||
|
5f0087
|
||||||
|
5f00af
|
||||||
|
5f00d7
|
||||||
|
5f00ff
|
||||||
|
5f5f00
|
||||||
|
5f5f5f
|
||||||
|
5f5f87
|
||||||
|
5f5faf
|
||||||
|
5f5fd7
|
||||||
|
5f5fff
|
||||||
|
5f8700
|
||||||
|
5f875f
|
||||||
|
5f8787
|
||||||
|
5f87af
|
||||||
|
5f87d7
|
||||||
|
5f87ff
|
||||||
|
5faf00
|
||||||
|
5faf5f
|
||||||
|
5faf87
|
||||||
|
5fafaf
|
||||||
|
5fafd7
|
||||||
|
5fafff
|
||||||
|
5fd700
|
||||||
|
5fd75f
|
||||||
|
5fd787
|
||||||
|
5fd7af
|
||||||
|
5fd7d7
|
||||||
|
5fd7ff
|
||||||
|
5fff00
|
||||||
|
5fff5f
|
||||||
|
5fff87
|
||||||
|
5fffaf
|
||||||
|
5fffd7
|
||||||
|
5fffff
|
||||||
|
870000
|
||||||
|
87005f
|
||||||
|
870087
|
||||||
|
8700af
|
||||||
|
8700d7
|
||||||
|
8700ff
|
||||||
|
875f00
|
||||||
|
875f5f
|
||||||
|
875f87
|
||||||
|
875faf
|
||||||
|
875fd7
|
||||||
|
875fff
|
||||||
|
878700
|
||||||
|
87875f
|
||||||
|
878787
|
||||||
|
8787af
|
||||||
|
8787d7
|
||||||
|
8787ff
|
||||||
|
87af00
|
||||||
|
87af5f
|
||||||
|
87af87
|
||||||
|
87afaf
|
||||||
|
87afd7
|
||||||
|
87afff
|
||||||
|
87d700
|
||||||
|
87d75f
|
||||||
|
87d787
|
||||||
|
87d7af
|
||||||
|
87d7d7
|
||||||
|
87d7ff
|
||||||
|
87ff00
|
||||||
|
87ff5f
|
||||||
|
87ff87
|
||||||
|
87ffaf
|
||||||
|
87ffd7
|
||||||
|
87ffff
|
||||||
|
af0000
|
||||||
|
af005f
|
||||||
|
af0087
|
||||||
|
af00af
|
||||||
|
af00d7
|
||||||
|
af00ff
|
||||||
|
af5f00
|
||||||
|
af5f5f
|
||||||
|
af5f87
|
||||||
|
af5faf
|
||||||
|
af5fd7
|
||||||
|
af5fff
|
||||||
|
af8700
|
||||||
|
af875f
|
||||||
|
af8787
|
||||||
|
af87af
|
||||||
|
af87d7
|
||||||
|
af87ff
|
||||||
|
afaf00
|
||||||
|
afaf5f
|
||||||
|
afaf87
|
||||||
|
afafaf
|
||||||
|
afafd7
|
||||||
|
afafff
|
||||||
|
afd700
|
||||||
|
afd75f
|
||||||
|
afd787
|
||||||
|
afd7af
|
||||||
|
afd7d7
|
||||||
|
afd7ff
|
||||||
|
afff00
|
||||||
|
afff5f
|
||||||
|
afff87
|
||||||
|
afffaf
|
||||||
|
afffd7
|
||||||
|
afffff
|
||||||
|
d70000
|
||||||
|
d7005f
|
||||||
|
d70087
|
||||||
|
d700af
|
||||||
|
d700d7
|
||||||
|
d700ff
|
||||||
|
d75f00
|
||||||
|
d75f5f
|
||||||
|
d75f87
|
||||||
|
d75faf
|
||||||
|
d75fd7
|
||||||
|
d75fff
|
||||||
|
d78700
|
||||||
|
d7875f
|
||||||
|
d78787
|
||||||
|
d787af
|
||||||
|
d787d7
|
||||||
|
d787ff
|
||||||
|
d7af00
|
||||||
|
d7af5f
|
||||||
|
d7af87
|
||||||
|
d7afaf
|
||||||
|
d7afd7
|
||||||
|
d7afff
|
||||||
|
d7d700
|
||||||
|
d7d75f
|
||||||
|
d7d787
|
||||||
|
d7d7af
|
||||||
|
d7d7d7
|
||||||
|
d7d7ff
|
||||||
|
d7ff00
|
||||||
|
d7ff5f
|
||||||
|
d7ff87
|
||||||
|
d7ffaf
|
||||||
|
d7ffd7
|
||||||
|
d7ffff
|
||||||
|
ff0000
|
||||||
|
ff005f
|
||||||
|
ff0087
|
||||||
|
ff00af
|
||||||
|
ff00d7
|
||||||
|
ff00ff
|
||||||
|
ff5f00
|
||||||
|
ff5f5f
|
||||||
|
ff5f87
|
||||||
|
ff5faf
|
||||||
|
ff5fd7
|
||||||
|
ff5fff
|
||||||
|
ff8700
|
||||||
|
ff875f
|
||||||
|
ff8787
|
||||||
|
ff87af
|
||||||
|
ff87d7
|
||||||
|
ff87ff
|
||||||
|
ffaf00
|
||||||
|
ffaf5f
|
||||||
|
ffaf87
|
||||||
|
ffafaf
|
||||||
|
ffafd7
|
||||||
|
ffafff
|
||||||
|
ffd700
|
||||||
|
ffd75f
|
||||||
|
ffd787
|
||||||
|
ffd7af
|
||||||
|
ffd7d7
|
||||||
|
ffd7ff
|
||||||
|
ffff00
|
||||||
|
ffff5f
|
||||||
|
ffff87
|
||||||
|
ffffaf
|
||||||
|
ffffd7
|
||||||
|
ffffff
|
||||||
|
080808
|
||||||
|
121212
|
||||||
|
1c1c1c
|
||||||
|
262626
|
||||||
|
303030
|
||||||
|
3a3a3a
|
||||||
|
444444
|
||||||
|
4e4e4e
|
||||||
|
585858
|
||||||
|
626262
|
||||||
|
6c6c6c
|
||||||
|
767676
|
||||||
|
808080
|
||||||
|
8a8a8a
|
||||||
|
949494
|
||||||
|
9e9e9e
|
||||||
|
a8a8a8
|
||||||
|
b2b2b2
|
||||||
|
bcbcbc
|
||||||
|
c6c6c6
|
||||||
|
d0d0d0
|
||||||
|
dadada
|
||||||
|
e4e4e4
|
||||||
|
eeeeee
|
@@ -2,15 +2,20 @@
|
|||||||
<!-- Generated with glade 3.22.1 -->
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.20"/>
|
<requires lib="gtk+" version="3.20"/>
|
||||||
<object class="GtkImage" id="image1">
|
<object class="GtkImage" id="color-img">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="stock">gtk-go-up</property>
|
<property name="stock">gtk-select-color</property>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkImage" id="image2">
|
<object class="GtkImage" id="load-mapping-img">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="stock">gtk-go-down</property>
|
<property name="stock">gtk-open</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="save-mapping-img">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-save-as</property>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkWindow" id="main-window">
|
<object class="GtkWindow" id="main-window">
|
||||||
<property name="height_request">250</property>
|
<property name="height_request">250</property>
|
||||||
@@ -43,6 +48,8 @@
|
|||||||
<property name="sensitive">False</property>
|
<property name="sensitive">False</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">load-mapping-img</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action"/>
|
||||||
</style>
|
</style>
|
||||||
@@ -58,6 +65,8 @@
|
|||||||
<property name="sensitive">False</property>
|
<property name="sensitive">False</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">save-mapping-img</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action"/>
|
||||||
</style>
|
</style>
|
||||||
@@ -90,42 +99,144 @@
|
|||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSearchEntry" id="cell-search">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="primary_icon_name">edit-find-symbolic</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="primary_icon_activatable">False</property>
|
<child>
|
||||||
<property name="primary_icon_sensitive">False</property>
|
<object class="GtkSearchEntry" id="cell-search">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="primary_icon_name">edit-find-symbolic</property>
|
||||||
|
<property name="primary_icon_activatable">False</property>
|
||||||
|
<property name="primary_icon_sensitive">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hscrollbar_policy">never</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="cell-tree">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="enable_search">False</property>
|
||||||
|
<property name="enable_grid_lines">both</property>
|
||||||
|
<child internal-child="selection">
|
||||||
|
<object class="GtkTreeSelection"/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkScrolledWindow">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="hscrollbar_policy">never</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="shadow_type">in</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeView" id="cell-tree">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="headers_clickable">False</property>
|
<child>
|
||||||
<property name="enable_search">False</property>
|
<object class="GtkButton" id="button-up-sort">
|
||||||
<property name="enable_grid_lines">both</property>
|
<property name="visible">True</property>
|
||||||
<child internal-child="selection">
|
<property name="can_focus">True</property>
|
||||||
<object class="GtkTreeSelection"/>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">sort-up-img</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="button-down-sort">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">sort-down-img</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="auto-color-button">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">color-img</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hscrollbar_policy">never</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkViewport">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBox" id="layer-list">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="selection_mode">none</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -142,83 +253,31 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox" id="activity-bar">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<placeholder/>
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="button-up-sort">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="image">image1</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="button-down-sort">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="image">image2</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkScrolledWindow">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="hscrollbar_policy">never</property>
|
|
||||||
<property name="shadow_type">in</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkViewport">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkListBox" id="layer-list">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="selection_mode">none</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">False</property>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="GtkImage" id="sort-down-img">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-sort-ascending</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="sort-up-img">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-sort-descending</property>
|
||||||
|
</object>
|
||||||
</interface>
|
</interface>
|
17
resources/resources.xml
Normal file
17
resources/resources.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gresources>
|
||||||
|
<gresource prefix="/gui">
|
||||||
|
<file compressed="true">main.glade</file>
|
||||||
|
<file compressed="true">about.glade</file>
|
||||||
|
<file>layer-widget.glade</file>
|
||||||
|
<file>dialog.glade</file>
|
||||||
|
</gresource>
|
||||||
|
<gresource prefix="/data">
|
||||||
|
<file compressed="true">color-palette.txt</file>
|
||||||
|
</gresource>
|
||||||
|
<gresource prefix="/images">
|
||||||
|
<file compressed="true" alias="logo.svg">../icon/gds-render.svg</file>
|
||||||
|
</gresource>
|
||||||
|
</gresources>
|
||||||
|
|
||||||
|
|
@@ -270,7 +270,7 @@ static void renderer_settings_dialog_init(RendererSettingsDialog *self)
|
|||||||
|
|
||||||
dialog = &self->parent;
|
dialog = &self->parent;
|
||||||
|
|
||||||
builder = gtk_builder_new_from_resource("/dialog.glade");
|
builder = gtk_builder_new_from_resource("/gui/dialog.glade");
|
||||||
box = GTK_WIDGET(gtk_builder_get_object(builder, "dialog-box"));
|
box = GTK_WIDGET(gtk_builder_get_object(builder, "dialog-box"));
|
||||||
self->radio_latex = GTK_WIDGET(gtk_builder_get_object(builder, "latex-radio"));
|
self->radio_latex = GTK_WIDGET(gtk_builder_get_object(builder, "latex-radio"));
|
||||||
self->radio_cairo_pdf = GTK_WIDGET(gtk_builder_get_object(builder, "cairo-pdf-radio"));
|
self->radio_cairo_pdf = GTK_WIDGET(gtk_builder_get_object(builder, "cairo-pdf-radio"));
|
||||||
|
@@ -62,7 +62,7 @@ static void layer_element_init(LayerElement *self)
|
|||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *glade_box;
|
GtkWidget *glade_box;
|
||||||
builder = gtk_builder_new_from_resource("/layer-widget.glade");
|
builder = gtk_builder_new_from_resource("/gui/layer-widget.glade");
|
||||||
glade_box = GTK_WIDGET(gtk_builder_get_object(builder, "box"));
|
glade_box = GTK_WIDGET(gtk_builder_get_object(builder, "box"));
|
||||||
gtk_container_add(GTK_CONTAINER(self), glade_box);
|
gtk_container_add(GTK_CONTAINER(self), glade_box);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user