Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
db107ed1
Commit
db107ed1
authored
Apr 05, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt op window, button text size affected by zoom
parent
74689aad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
+22
-2
xtt/lib/xtt/gtk/xtt_op_gtk.h
xtt/lib/xtt/gtk/xtt_op_gtk.h
+1
-0
xtt/mmi/xtt/src/xtt_alarm_active.png
xtt/mmi/xtt/src/xtt_alarm_active.png
+0
-0
No files found.
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
View file @
db107ed1
...
...
@@ -688,7 +688,7 @@ OpGtk::OpGtk( void *op_parent_ctx,
gtk_container_add
(
GTK_CONTAINER
(
node_label_bg
),
node_label
);
GtkWidget
*
node_button
=
gtk_event_box_new
();
gtk_container_set_border_width
(
GTK_CONTAINER
(
node_button
),
1
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
node_button
),
2
);
GtkWidget
*
node_hbox
=
gtk_hbox_new
(
FALSE
,
0
);
// dcli_translate_filename( fname, "$pwr_exe/xtt_ind_gray2.png");
// GtkWidget *node_image = gtk_image_new_from_file( fname);
...
...
@@ -1176,7 +1176,7 @@ int OpGtk::configure( char *opplace_str)
char
*
textutf8
=
g_convert
(
button_title
[
i
],
-
1
,
"UTF-8"
,
"ISO8859-1"
,
NULL
,
NULL
,
NULL
);
// appl_buttons[i] = gtk_button_new_with_label(textutf8);
appl_buttons
[
i
]
=
gtk_event_box_new
();
gtk_container_set_border_width
(
GTK_CONTAINER
(
appl_buttons
[
i
]),
1
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
appl_buttons
[
i
]),
2
);
GtkWidget
*
label
=
gtk_label_new
(
textutf8
);
g_free
(
textutf8
);
gtk_container_add
(
GTK_CONTAINER
(
appl_buttons
[
i
]),
label
);
...
...
@@ -1342,6 +1342,7 @@ void OpGtk::activate_zoom_in( GtkWidget *w, gpointer data)
op
->
text_size
+=
2
;
op
->
update_alarm_info
();
op
->
set_text_size
();
}
void
OpGtk
::
activate_zoom_out
(
GtkWidget
*
w
,
gpointer
data
)
...
...
@@ -1353,6 +1354,7 @@ void OpGtk::activate_zoom_out( GtkWidget *w, gpointer data)
op
->
text_size
-=
2
;
op
->
update_alarm_info
();
op
->
set_text_size
();
}
void
OpGtk
::
activate_colortheme
(
GtkWidget
*
w
,
gpointer
data
)
...
...
@@ -1961,3 +1963,21 @@ void OpGtk::set_color_theme( int idx)
}
}
}
#define FONT_SCALE 0.7
void
OpGtk
::
set_text_size
()
{
PangoFontDescription
*
fd
=
NULL
;
char
str
[
80
];
char
bold_str
[
10
]
=
""
;
sprintf
(
str
,
"%s %s%f"
,
"Lucida Sans"
,
bold_str
,
FONT_SCALE
*
(
text_size
+
2
));
fd
=
pango_font_description_from_string
(
str
);
for
(
unsigned
int
i
=
0
;
i
<
25
;
i
++
)
{
if
(
appl_buttons
[
i
])
{
gtk_widget_modify_font
(
GTK_WIDGET
(
gtk_bin_get_child
(
GTK_BIN
(
appl_buttons
[
i
]))),
fd
);
}
}
}
xtt/lib/xtt/gtk/xtt_op_gtk.h
View file @
db107ed1
...
...
@@ -117,6 +117,7 @@ class OpGtk : public Op {
void
change_sup_color
(
void
*
imagew
,
op_eSupColor
color
);
void
set_title
(
char
*
user
);
void
set_color_theme
(
int
idx
);
void
set_text_size
();
static
void
activate_exit
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_aalarm_ack
(
GtkWidget
*
w
,
gpointer
data
);
...
...
xtt/mmi/xtt/src/xtt_alarm_active.png
View replaced file @
74689aad
View file @
db107ed1
511 Bytes
|
W:
|
H:
453 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment