- Better inklevel 25/50/75 markers.

This commit is contained in:
Tim Waugh 2010-03-26 10:36:13 +00:00
parent 9cf8a5691d
commit 83894836a8
2 changed files with 20 additions and 12 deletions

View File

@ -1,6 +1,6 @@
diff -up system-config-printer-1.2.0/gtkinklevel.py.inklevel system-config-printer-1.2.0/gtkinklevel.py diff -up system-config-printer-1.2.0/gtkinklevel.py.inklevel system-config-printer-1.2.0/gtkinklevel.py
--- system-config-printer-1.2.0/gtkinklevel.py.inklevel 2009-12-03 17:06:22.000000000 +0000 --- system-config-printer-1.2.0/gtkinklevel.py.inklevel 2009-12-03 17:06:22.000000000 +0000
+++ system-config-printer-1.2.0/gtkinklevel.py 2010-03-25 16:25:55.108235939 +0000 +++ system-config-printer-1.2.0/gtkinklevel.py 2010-03-26 10:34:15.981600493 +0000
@@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
@ -33,26 +33,32 @@ diff -up system-config-printer-1.2.0/gtkinklevel.py.inklevel system-config-print
ctx.stroke_preserve () ctx.stroke_preserve ()
if fill_point > 0.0: if fill_point > 0.0:
grad_width = 0.10 grad_width = 0.10
@@ -90,6 +91,25 @@ class GtkInkLevel (gtk.DrawingArea): @@ -90,6 +91,31 @@ class GtkInkLevel (gtk.DrawingArea):
ctx.set_source_rgb (1, 1, 1) ctx.set_source_rgb (1, 1, 1)
ctx.fill () ctx.fill ()
+ ctx.set_line_width (thickness / 2) + ctx.set_line_width (thickness / 2)
+ +
+ ctx.move_to (0.03, 0.5) + ctx.move_to (0.5, 0.0)
+ ctx.line_to (0.9, 0.5) + ctx.line_to (0.5, 1.0)
+ ctx.set_source_rgb (r, g, b) + ctx.set_source_rgb (r, g, b)
+ ctx.set_dash ([0.1])
+ ctx.stroke () + ctx.stroke ()
+ +
+ ctx.move_to (0, 0.75) + # 50% marker
+ ctx.line_to (1, 0.75) + ctx.move_to (0.4, 0.5)
+ ctx.line_to (0.6, 0.5)
+ ctx.set_source_rgb (r, g, b) + ctx.set_source_rgb (r, g, b)
+ ctx.set_dash ([0.05])
+ ctx.stroke () + ctx.stroke ()
+ +
+ ctx.move_to (0.15, 0.25) + # 25% marker
+ ctx.line_to (0.6, 0.25) + ctx.move_to (0.45, 0.75)
+ ctx.line_to (0.55, 0.75)
+ ctx.set_source_rgb (r, g, b)
+ ctx.stroke ()
+
+ # 75% marker
+ ctx.move_to (0.45, 0.25)
+ ctx.line_to (0.55, 0.25)
+ ctx.set_source_rgb (r, g, b) + ctx.set_source_rgb (r, g, b)
+ ctx.stroke () + ctx.stroke ()
+ +
@ -60,8 +66,8 @@ diff -up system-config-printer-1.2.0/gtkinklevel.py.inklevel system-config-print
# Try it out. # Try it out.
import gobject import gobject
diff -up system-config-printer-1.2.0/system-config-printer.py.inklevel system-config-printer-1.2.0/system-config-printer.py diff -up system-config-printer-1.2.0/system-config-printer.py.inklevel system-config-printer-1.2.0/system-config-printer.py
--- system-config-printer-1.2.0/system-config-printer.py.inklevel 2010-03-25 16:25:37.904233984 +0000 --- system-config-printer-1.2.0/system-config-printer.py.inklevel 2010-03-26 10:34:06.158727658 +0000
+++ system-config-printer-1.2.0/system-config-printer.py 2010-03-25 16:26:07.037359284 +0000 +++ system-config-printer-1.2.0/system-config-printer.py 2010-03-26 10:34:06.250725897 +0000
@@ -2681,6 +2681,7 @@ class GUI(GtkGUI, monitor.Watcher): @@ -2681,6 +2681,7 @@ class GUI(GtkGUI, monitor.Watcher):
vbox = gtk.VBox (spacing=6) vbox = gtk.VBox (spacing=6)
subhbox = gtk.HBox () subhbox = gtk.HBox ()

View File

@ -120,6 +120,7 @@ printers.
%patch9 -p1 -b .JobCancel %patch9 -p1 -b .JobCancel
# Make inklevel widget easier to read (bug #576930). # Make inklevel widget easier to read (bug #576930).
# Better inklevel 25/50/75 markers.
%patch10 -p1 -b .inklevel %patch10 -p1 -b .inklevel
# check-device-ids: search harder for missing Device IDs. # check-device-ids: search harder for missing Device IDs.
@ -258,6 +259,7 @@ exit 0
%changelog %changelog
* Fri Mar 26 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-10 * Fri Mar 26 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-10
- Better inklevel 25/50/75 markers.
- Fixed window transience for 'Change Device URI'. - Fixed window transience for 'Change Device URI'.
- More async traceback fixes (Ubuntu #547075). - More async traceback fixes (Ubuntu #547075).