Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rugby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bruce Cowan
Rugby
Commits
5e05c763
Commit
5e05c763
authored
12 years ago
by
Bruce Cowan
Browse files
Options
Downloads
Patches
Plain Diff
Some theming changes
parent
2d2e4fe7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rugby-cell-renderer-score.c
+14
-18
14 additions, 18 deletions
rugby-cell-renderer-score.c
rugby.css
+6
-15
6 additions, 15 deletions
rugby.css
with
20 additions
and
33 deletions
rugby-cell-renderer-score.c
+
14
−
18
View file @
5e05c763
...
@@ -17,9 +17,9 @@ struct _RugbyCellRendererScorePrivate
...
@@ -17,9 +17,9 @@ struct _RugbyCellRendererScorePrivate
};
};
/* Style classes for the different types of score */
/* Style classes for the different types of score */
#define RUGBY_STYLE_CLASS_TRY
"
try"
#define RUGBY_STYLE_CLASS_TRY
"score-
try"
#define RUGBY_STYLE_CLASS_UTRY "utry"
#define RUGBY_STYLE_CLASS_UTRY "
score-
utry"
#define RUGBY_STYLE_CLASS_KICK "kick"
#define RUGBY_STYLE_CLASS_KICK "
score-
kick"
G_DEFINE_TYPE
(
RugbyCellRendererScore
,
rugby_cell_renderer_score
,
GTK_TYPE_CELL_RENDERER
)
G_DEFINE_TYPE
(
RugbyCellRendererScore
,
rugby_cell_renderer_score
,
GTK_TYPE_CELL_RENDERER
)
...
@@ -136,7 +136,7 @@ render_bar (GtkStyleContext *context,
...
@@ -136,7 +136,7 @@ render_bar (GtkStyleContext *context,
break
;
break
;
}
}
gtk_render_ac
tivity
(
context
,
cr
,
x
,
y
,
width
,
height
);
gtk_render_
b
ac
kground
(
context
,
cr
,
x
,
y
,
width
,
height
);
gtk_style_context_restore
(
context
);
gtk_style_context_restore
(
context
);
}
}
...
@@ -153,7 +153,7 @@ rugby_cell_renderer_score_render (GtkCellRenderer *cell,
...
@@ -153,7 +153,7 @@ rugby_cell_renderer_score_render (GtkCellRenderer *cell,
GtkStyleContext
*
context
;
GtkStyleContext
*
context
;
gint
xpad
,
ypad
;
gint
xpad
,
ypad
;
gdouble
x
,
y
,
total_w
,
w
,
h
;
gdouble
x
,
y
,
total_w
,
w
,
h
;
GtkBorder
padding
,
border
;
GtkBorder
border
;
gint
tries
,
utries
,
kicks
;
gint
tries
,
utries
,
kicks
;
gint
total
;
gint
total
;
gint
i
;
gint
i
;
...
@@ -166,29 +166,25 @@ rugby_cell_renderer_score_render (GtkCellRenderer *cell,
...
@@ -166,29 +166,25 @@ rugby_cell_renderer_score_render (GtkCellRenderer *cell,
total_w
=
cell_area
->
width
-
xpad
*
2
;
total_w
=
cell_area
->
width
-
xpad
*
2
;
h
=
cell_area
->
height
-
ypad
*
2
;
h
=
cell_area
->
height
-
ypad
*
2
;
//gtk_style_context_add_class (context, GTK_STYLE_CLASS_PROGRESSBAR);
gtk_style_context_save
(
context
);
gtk_style_context_save
(
context
);
gtk_style_context_add_class
(
context
,
GTK_STYLE_CLASS_TROUGH
);
gtk_style_context_add_class
(
context
,
"level-cell"
);
gtk_render_background
(
context
,
cr
,
x
,
y
,
total_w
,
h
);
gtk_render_background
(
context
,
cr
,
x
,
y
,
total_w
,
h
);
gtk_render_frame
(
context
,
cr
,
x
,
y
,
total_w
,
h
);
gtk_render_frame
(
context
,
cr
,
x
,
y
,
total_w
,
h
);
gtk_style_context_get_border
(
context
,
GTK_STATE_FLAG_NORMAL
,
&
border
);
gtk_style_context_get_padding
(
context
,
GTK_STATE_FLAG_NORMAL
,
&
padding
);
x
+=
border
.
left
+
padding
.
left
;
y
+=
border
.
top
+
padding
.
top
;
total_w
-=
border
.
left
+
border
.
right
+
padding
.
left
+
padding
.
right
;
h
-=
border
.
top
+
border
.
bottom
+
padding
.
top
+
padding
.
bottom
;
gtk_style_context_restore
(
context
);
tries
=
priv
->
tries
;
tries
=
priv
->
tries
;
utries
=
priv
->
utries
;
utries
=
priv
->
utries
;
kicks
=
priv
->
kicks
;
kicks
=
priv
->
kicks
;
total
=
tries
*
TRY_POINTS
+
utries
*
UTRY_POINTS
+
kicks
*
KICK_POINTS
;
total
=
tries
*
TRY_POINTS
+
utries
*
UTRY_POINTS
+
kicks
*
KICK_POINTS
;
gtk_style_context_save
(
context
);
gtk_style_context_get_border
(
context
,
GTK_STATE_FLAG_NORMAL
,
&
border
);
gtk_style_context_add_class
(
context
,
GTK_STYLE_CLASS_PROGRESSBAR
);
x
+=
border
.
left
;
y
+=
border
.
top
;
total_w
-=
border
.
left
+
border
.
right
;
h
-=
border
.
top
+
border
.
bottom
;
gtk_style_context_add_class
(
context
,
"fill-block"
);
w
=
total_w
/
(
total
/
7
.
0
);
w
=
total_w
/
(
total
/
7
.
0
);
for
(
i
=
0
;
i
<
tries
;
i
++
)
for
(
i
=
0
;
i
<
tries
;
i
++
)
...
...
This diff is collapsed.
Click to expand it.
rugby.css
+
6
−
15
View file @
5e05c763
.try
.
cell.level-cell.fill-block.score-
try
{
{
/* Scarlet red */
/* Scarlet red */
background-image
:
-gtk-gradient
(
linear
,
background-color
:
#cc0000
;
left
top
,
left
bottom
,
from
(
#ef2929
),
to
(
#a40000
));
}
}
.utry
.
cell.level-cell.fill-block.score-
utry
{
{
/* Chameleon */
/* Chameleon */
background-image
:
-gtk-gradient
(
linear
,
background-color
:
#edd400
;
left
top
,
left
bottom
,
from
(
#8ae234
),
to
(
#4e9a06
));
}
}
.kick
.
cell.level-cell.fill-block.score-
kick
{
{
/* Butter */
/* Butter */
background-image
:
-gtk-gradient
(
linear
,
background-color
:
#73d216
;
left
top
,
left
bottom
,
from
(
#fce94f
),
to
(
#c4a000
));
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment