Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
yad
Commits
36f4ca7a
Commit
36f4ca7a
authored
May 26, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert image-on-top for left image position
parent
92a7978d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
0 deletions
+24
-0
yad.1
data/yad.1
+3
-0
main.c
src/main.c
+17
-0
option.c
src/option.c
+3
-0
yad.h
src/yad.h
+1
-0
No files found.
data/yad.1
View file @
36f4ca7a
...
...
@@ -137,6 +137,9 @@ Set type of dialog text justification. \fITYPE\fP may be \fIleft\fP, \fIright\fP
Set the dialog image which appears on the left side of dialog`s text.
\fIIMAGE\fP might be file name or icon name from current icon theme.
.TP
.B \-\-image-on-top
Show image above main widget instead of left. This option is always on for print dialog.
.TP
.B \-\-icon-theme=\fITHEME\fP
Use specified GTK icon theme instead of default.
.TP
...
...
src/main.c
View file @
36f4ca7a
...
...
@@ -324,6 +324,8 @@ create_layout (GtkWidget *dlg)
imw
=
mw
;
/* create layout */
if
(
options
.
data
.
image_on_top
)
{
layout
=
gtk_box_new
(
GTK_ORIENTATION_VERTICAL
,
5
);
box
=
gtk_box_new
(
GTK_ORIENTATION_HORIZONTAL
,
5
);
...
...
@@ -340,6 +342,21 @@ create_layout (GtkWidget *dlg)
else
gtk_box_pack_start
(
GTK_BOX
(
layout
),
imw
,
TRUE
,
TRUE
,
0
);
}
}
else
{
layout
=
gtk_box_new
(
GTK_ORIENTATION_HORIZONTAL
,
5
);
box
=
gtk_box_new
(
GTK_ORIENTATION_VERTICAL
,
5
);
if
(
text
)
gtk_box_pack_start
(
GTK_BOX
(
box
),
text
,
FALSE
,
FALSE
,
0
);
if
(
imw
)
gtk_box_pack_start
(
GTK_BOX
(
box
),
imw
,
TRUE
,
TRUE
,
0
);
if
(
image
)
gtk_box_pack_start
(
GTK_BOX
(
layout
),
image
,
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
layout
),
box
,
TRUE
,
TRUE
,
0
);
}
if
(
options
.
mode
==
YAD_MODE_DND
)
dnd_init
(
layout
);
...
...
src/option.c
View file @
36f4ca7a
...
...
@@ -115,6 +115,8 @@ static GOptionEntry general_options[] = {
N_
(
"Set the dialog text alignment (left, center, right, fill)"
),
N_
(
"TYPE"
)
},
{
"image"
,
0
,
G_OPTION_FLAG_NOALIAS
,
G_OPTION_ARG_FILENAME
,
&
options
.
data
.
dialog_image
,
N_
(
"Set the dialog image"
),
N_
(
"IMAGE"
)
},
{
"image-on-top"
,
0
,
G_OPTION_FLAG_NOALIAS
,
G_OPTION_ARG_NONE
,
&
options
.
data
.
image_on_top
,
N_
(
"Show image above main widget"
),
NULL
},
{
"icon-theme"
,
0
,
G_OPTION_FLAG_NOALIAS
,
G_OPTION_ARG_STRING
,
&
options
.
data
.
icon_theme
,
N_
(
"Use specified icon theme instead of default"
),
N_
(
"THEME"
)
},
{
"expander"
,
0
,
G_OPTION_FLAG_OPTIONAL_ARG
,
G_OPTION_ARG_CALLBACK
,
set_expander
,
...
...
@@ -1603,6 +1605,7 @@ yad_options_init (void)
options
.
data
.
text_width
=
0
;
options
.
data
.
text_align
=
GTK_JUSTIFY_LEFT
;
options
.
data
.
dialog_image
=
NULL
;
options
.
data
.
image_on_top
=
FALSE
;
options
.
data
.
icon_theme
=
NULL
;
options
.
data
.
expander
=
NULL
;
options
.
data
.
timeout
=
0
;
...
...
src/yad.h
View file @
36f4ca7a
...
...
@@ -238,6 +238,7 @@ typedef struct {
guint
text_width
;
GtkJustification
text_align
;
gchar
*
dialog_image
;
gboolean
image_on_top
;
gchar
*
icon_theme
;
gchar
*
expander
;
gint
borders
;
...
...
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