Merge lp:~macslow/unity/unity.fix-863246 into lp:unity

Proposed by Mirco Müller
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 1832
Proposed branch: lp:~macslow/unity/unity.fix-863246
Merge into: lp:unity
Diff against target: 503 lines (+156/-170)
4 files modified
plugins/unityshell/resources/dash-widgets.json (+2/-2)
plugins/unityshell/src/DashStyle.cpp (+151/-164)
plugins/unityshell/src/DashStyle.h (+1/-2)
plugins/unityshell/src/FilterGenreWidget.cpp (+2/-2)
To merge this branch: bzr merge lp:~macslow/unity/unity.fix-863246
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Review via email: mp+88504@code.launchpad.net

Description of the change

Since the bug LP: #863246 states so many issues, I'm splitting up the work into a series of branches/fixes. This first part corrects pixel-grid alignment of selected/unselected button-outlines, opacity-values (outline, filling) and vertical and horizontal spacing between buttons.

Here are a few screenshots/screencast showing this first set of improvements:

 http://people.canonical.com/~mmueller/fix-863246-part-1.png
 http://people.canonical.com/~mmueller/fix-863246-part-4.png
 http://people.canonical.com/~mmueller/fix-863246-part-5.ogv

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

+1

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

Attempt to merge into lp:unity failed due to conflicts:

text conflict in plugins/unityshell/resources/dash-widgets.json
text conflict in plugins/unityshell/src/FilterGenreWidget.cpp

Revision history for this message
Unity Merger (unity-merger) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/resources/dash-widgets.json'
--- plugins/unityshell/resources/dash-widgets.json 2012-01-09 10:27:16 +0000
+++ plugins/unityshell/resources/dash-widgets.json 2012-01-13 15:19:22 +0000
@@ -40,14 +40,14 @@
40 "icon-gap" : 40},40 "icon-gap" : 40},
4141
42 "button-label": {42 "button-label": {
43 "border-opacity" : [ 1.0, 0.5, 0.5, 0.5, 0.5],43 "border-opacity" : [ 1.0, 0.15, 0.15, 0.15, 0.15],
44 "border-color" : ["#ffffff", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF"],44 "border-color" : ["#ffffff", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF"],
45 "border-size" : [ 2.0, 1.0, 1.0, 0.5, 0.5],45 "border-size" : [ 2.0, 1.0, 1.0, 0.5, 0.5],
46 "text-size" : 1.0,46 "text-size" : 1.0,
47 "text-color" : ["#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff"],47 "text-color" : ["#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff"],
48 "text-opacity" : [ 1.0, 1.0, 1.0, 1.0, 1.0], 48 "text-opacity" : [ 1.0, 1.0, 1.0, 1.0, 1.0],
49 "fill-color" : ["#FFFFFF", "#000000", "#000000", "#000000", "#000000"],49 "fill-color" : ["#FFFFFF", "#000000", "#000000", "#000000", "#000000"],
50 "fill-opacity" : [ 0.25, 0.0, 0.0, 0.0, 0.0],50 "fill-opacity" : [ 0.15, 0.0, 0.0, 0.0, 0.0],
51 "overlay-opacity": [ 0.1, 0.1, 0.1, 0.0, 0.0],51 "overlay-opacity": [ 0.1, 0.1, 0.1, 0.0, 0.0],
52 "overlay-mode" : [ "normal", "normal", "normal", "normal", "normal"],52 "overlay-mode" : [ "normal", "normal", "normal", "normal", "normal"],
53 "blur-size" : [ 1, 1, 1, 0, 0]},53 "blur-size" : [ 1, 1, 1, 0, 0]},
5454
=== modified file 'plugins/unityshell/src/DashStyle.cpp'
--- plugins/unityshell/src/DashStyle.cpp 2011-10-25 16:32:49 +0000
+++ plugins/unityshell/src/DashStyle.cpp 2012-01-13 15:19:22 +0000
@@ -61,21 +61,26 @@
61 ::cairo_set_source_rgba(cr, color.red, color.green, color.blue, color.alpha);61 ::cairo_set_source_rgba(cr, color.red, color.green, color.blue, color.alpha);
62}62}
6363
64inline double _align(double val)64inline double _align(double val, bool odd=true)
65{65{
66 double fract = val - (int) val;66 double fract = val - (int) val;
6767
68 // for strokes with an odd line-width68 if (odd)
69 if (fract != 0.5f)69 {
70 return (double) ((int) val + 0.5f);70 // for strokes with an odd line-width
71 else71 if (fract != 0.5f)
72 return val;72 return (double) ((int) val + 0.5f);
7373 else
74 // for strokes with an even line-width74 return val;
75 /*if (fract != 0.0f)75 }
76 return (double) ((int) val);76 else
77 else77 {
78 return val;*/78 // for strokes with an even line-width
79 if (fract != 0.0f)
80 return (double) ((int) val);
81 else
82 return val;
83 }
79}84}
8085
81class LazyLoadTexture86class LazyLoadTexture
@@ -412,108 +417,62 @@
412 double y,417 double y,
413 double cornerRadius,418 double cornerRadius,
414 double width,419 double width,
415 double height,420 double height)
416 bool align)
417{421{
418 // sanity check422 // sanity check
419 if (cairo_status(cr) != CAIRO_STATUS_SUCCESS &&423 if (cairo_status(cr) != CAIRO_STATUS_SUCCESS &&
420 cairo_surface_get_type(cairo_get_target(cr)) != CAIRO_SURFACE_TYPE_IMAGE)424 cairo_surface_get_type(cairo_get_target(cr)) != CAIRO_SURFACE_TYPE_IMAGE)
421 return;425 return;
422426
427 bool odd = true;
428
429 odd = cairo_get_line_width (cr) == 2.0 ? false : true;
430
423 double radius = cornerRadius / aspect;431 double radius = cornerRadius / aspect;
424432
425 if (align)433 // top-left, right of the corner
426 {434 cairo_move_to(cr, _align (x + radius, odd), _align (y, odd));
427 // top-left, right of the corner435
428 cairo_move_to(cr, _align (x + radius), _align (y));436 // top-right, left of the corner
429437 cairo_line_to(cr, _align(x + width - radius, odd), _align(y, odd));
430 // top-right, left of the corner438
431 cairo_line_to(cr, _align(x + width - radius), _align(y));439 // top-right, below the corner
432440 cairo_arc(cr,
433 // top-right, below the corner441 _align(x + width - radius, odd),
434 cairo_arc(cr,442 _align(y + radius, odd),
435 _align(x + width - radius),443 radius,
436 _align(y + radius),444 -90.0f * G_PI / 180.0f,
437 radius,445 0.0f * G_PI / 180.0f);
438 -90.0f * G_PI / 180.0f,446
439 0.0f * G_PI / 180.0f);447 // bottom-right, above the corner
440448 cairo_line_to(cr, _align(x + width, odd), _align(y + height - radius, odd));
441 // bottom-right, above the corner449
442 cairo_line_to(cr, _align(x + width), _align(y + height - radius));450 // bottom-right, left of the corner
443451 cairo_arc(cr,
444 // bottom-right, left of the corner452 _align(x + width - radius, odd),
445 cairo_arc(cr,453 _align(y + height - radius, odd),
446 _align(x + width - radius),454 radius,
447 _align(y + height - radius),455 0.0f * G_PI / 180.0f,
448 radius,456 90.0f * G_PI / 180.0f);
449 0.0f * G_PI / 180.0f,457
450 90.0f * G_PI / 180.0f);458 // bottom-left, right of the corner
451459 cairo_line_to(cr, _align(x + radius, odd), _align(y + height, odd));
452 // bottom-left, right of the corner460
453 cairo_line_to(cr, _align(x + radius), _align(y + height));461 // bottom-left, above the corner
454462 cairo_arc(cr,
455 // bottom-left, above the corner463 _align(x + radius, odd),
456 cairo_arc(cr,464 _align(y + height - radius, odd),
457 _align(x + radius),465 radius,
458 _align(y + height - radius),466 90.0f * G_PI / 180.0f,
459 radius,467 180.0f * G_PI / 180.0f);
460 90.0f * G_PI / 180.0f,468
461 180.0f * G_PI / 180.0f);469 // top-left, right of the corner
462470 cairo_arc(cr,
463 // top-left, right of the corner471 _align(x + radius, odd),
464 cairo_arc(cr,472 _align(y + radius, odd),
465 _align(x + radius),473 radius,
466 _align(y + radius),474 180.0f * G_PI / 180.0f,
467 radius,475 270.0f * G_PI / 180.0f);
468 180.0f * G_PI / 180.0f,
469 270.0f * G_PI / 180.0f);
470 }
471 else
472 {
473 // top-left, right of the corner
474 cairo_move_to(cr, x + radius, y);
475
476 // top-right, left of the corner
477 cairo_line_to(cr, x + width - radius, y);
478
479 // top-right, below the corner
480 cairo_arc(cr,
481 x + width - radius,
482 y + radius,
483 radius,
484 -90.0f * G_PI / 180.0f,
485 0.0f * G_PI / 180.0f);
486
487 // bottom-right, above the corner
488 cairo_line_to(cr, x + width, y + height - radius);
489
490 // bottom-right, left of the corner
491 cairo_arc(cr,
492 x + width - radius,
493 y + height - radius,
494 radius,
495 0.0f * G_PI / 180.0f,
496 90.0f * G_PI / 180.0f);
497
498 // bottom-left, right of the corner
499 cairo_line_to(cr, x + radius, y + height);
500
501 // bottom-left, above the corner
502 cairo_arc(cr,
503 x + radius,
504 y + height - radius,
505 radius,
506 90.0f * G_PI / 180.0f,
507 180.0f * G_PI / 180.0f);
508
509 // top-left, right of the corner
510 cairo_arc(cr,
511 x + radius,
512 y + radius,
513 radius,
514 180.0f * G_PI / 180.0f,
515 270.0f * G_PI / 180.0f);
516 }
517}476}
518477
519static inline void _blurinner(guchar* pixel,478static inline void _blurinner(guchar* pixel,
@@ -1007,48 +966,51 @@
1007 Arrow arrow,966 Arrow arrow,
1008 nux::ButtonVisualState state)967 nux::ButtonVisualState state)
1009{968{
1010 double radius = cornerRadius / aspect;969 double radius = cornerRadius / aspect;
1011 double arrow_w = radius / 1.5;970 double arrow_w = radius / 1.5;
1012 double arrow_h = radius / 2.0;971 double arrow_h = radius / 2.0;
972 bool odd = true;
973
974 odd = cairo_get_line_width (cr) == 2.0 ? false : true;
1013975
1014 switch (segment)976 switch (segment)
1015 {977 {
1016 case Segment::LEFT:978 case Segment::LEFT:
1017 // top-left, right of the corner979 // top-left, right of the corner
1018 cairo_move_to(cr, x + radius, y);980 cairo_move_to(cr, _align(x + radius, odd), _align(y, odd));
1019981
1020 // top-right982 // top-right
1021 cairo_line_to(cr, x + width, y);983 cairo_line_to(cr, _align(x + width, odd), _align(y, odd));
1022984
1023 if (arrow == Arrow::RIGHT && state == nux::VISUAL_STATE_PRESSED)985 if (arrow == Arrow::RIGHT && state == nux::VISUAL_STATE_PRESSED)
1024 {986 {
1025 cairo_line_to(cr, x + width, y + height / 2.0 - arrow_h);987 cairo_line_to(cr, _align(x + width, odd), _align(y + height / 2.0 - arrow_h, odd));
1026 cairo_line_to(cr, x + width - arrow_w, y + height / 2.0);988 cairo_line_to(cr, _align(x + width - arrow_w, odd), _align(y + height / 2.0, odd));
1027 cairo_line_to(cr, x + width, y + height / 2.0 + arrow_h);989 cairo_line_to(cr, _align(x + width, odd), _align(y + height / 2.0 + arrow_h, odd));
1028 }990 }
1029991
1030 // bottom-right992 // bottom-right
1031 cairo_line_to(cr, x + width, y + height);993 cairo_line_to(cr, _align(x + width, odd), _align(y + height, odd));
1032994
1033 // bottom-left, right of the corner995 // bottom-left, right of the corner
1034 cairo_line_to(cr, x + radius, y + height);996 cairo_line_to(cr, _align(x + radius, odd), _align(y + height, odd));
1035997
1036 // bottom-left, above the corner998 // bottom-left, above the corner
1037 cairo_arc(cr,999 cairo_arc(cr,
1038 x + radius,1000 _align(x, odd) + _align(radius, odd),
1039 y + height - radius,1001 _align(y + height, odd) - _align(radius, odd),
1040 radius,1002 _align(radius, odd),
1041 90.0f * G_PI / 180.0f,1003 90.0f * G_PI / 180.0f,
1042 180.0f * G_PI / 180.0f);1004 180.0f * G_PI / 180.0f);
10431005
1044 // left, right of the corner1006 // left, right of the corner
1045 cairo_line_to(cr, x, y + radius);1007 cairo_line_to(cr, _align(x, odd), _align(y + radius, odd));
10461008
1047 // top-left, right of the corner1009 // top-left, right of the corner
1048 cairo_arc(cr,1010 cairo_arc(cr,
1049 x + radius,1011 _align(x, odd) + _align(radius, odd),
1050 y + radius,1012 _align(y, odd) + _align(radius, odd),
1051 radius,1013 _align(radius, odd),
1052 180.0f * G_PI / 180.0f,1014 180.0f * G_PI / 180.0f,
1053 270.0f * G_PI / 180.0f);1015 270.0f * G_PI / 180.0f);
10541016
@@ -1056,29 +1018,29 @@
10561018
1057 case Segment::MIDDLE:1019 case Segment::MIDDLE:
1058 // top-left1020 // top-left
1059 cairo_move_to(cr, x, y);1021 cairo_move_to(cr, _align(x, odd), _align(y, odd));
10601022
1061 // top-right1023 // top-right
1062 cairo_line_to(cr, x + width, y);1024 cairo_line_to(cr, _align(x + width, odd), _align(y, odd));
10631025
1064 if ((arrow == Arrow::RIGHT || arrow == Arrow::BOTH) && state == nux::VISUAL_STATE_PRESSED)1026 if ((arrow == Arrow::RIGHT || arrow == Arrow::BOTH) && state == nux::VISUAL_STATE_PRESSED)
1065 {1027 {
1066 cairo_line_to(cr, x + width, y + height / 2.0 - arrow_h);1028 cairo_line_to(cr, _align(x + width, odd), _align(y + height / 2.0 - arrow_h, odd));
1067 cairo_line_to(cr, x + width - arrow_w, y + height / 2.0);1029 cairo_line_to(cr, _align(x + width - arrow_w, odd), _align(y + height / 2.0, odd));
1068 cairo_line_to(cr, x + width, y + height / 2.0 + arrow_h);1030 cairo_line_to(cr, _align(x + width, odd), _align(y + height / 2.0 + arrow_h, odd));
1069 }1031 }
10701032
1071 // bottom-right1033 // bottom-right
1072 cairo_line_to(cr, x + width, y + height);1034 cairo_line_to(cr, _align(x + width, odd), _align(y + height, odd));
10731035
1074 // bottom-left1036 // bottom-left
1075 cairo_line_to(cr, x, y + height);1037 cairo_line_to(cr, _align(x, odd), _align(y + height, odd));
10761038
1077 if ((arrow == Arrow::LEFT || arrow == Arrow::BOTH) && state == nux::VISUAL_STATE_PRESSED)1039 if ((arrow == Arrow::LEFT || arrow == Arrow::BOTH) && state == nux::VISUAL_STATE_PRESSED)
1078 {1040 {
1079 cairo_line_to(cr, x, y + height / 2.0 + arrow_h);1041 cairo_line_to(cr, _align(x, odd), _align(y + height / 2.0 + arrow_h, odd));
1080 cairo_line_to(cr, x + arrow_w, y + height / 2.0);1042 cairo_line_to(cr, _align(x + arrow_w, odd), _align(y + height / 2.0, odd));
1081 cairo_line_to(cr, x, y + height / 2.0 - arrow_h);1043 cairo_line_to(cr, _align(x, odd), _align(y + height / 2.0 - arrow_h, odd));
1082 }1044 }
10831045
1084 // back to top-left1046 // back to top-left
@@ -1087,38 +1049,38 @@
10871049
1088 case Segment::RIGHT:1050 case Segment::RIGHT:
1089 // top-left, right of the corner1051 // top-left, right of the corner
1090 cairo_move_to(cr, x, y);1052 cairo_move_to(cr, _align(x, odd), _align(y, odd));
10911053
1092 // top-right, left of the corner1054 // top-right, left of the corner
1093 cairo_line_to(cr, x + width - radius, y);1055 cairo_line_to(cr, _align(x + width - radius, odd), _align(y, odd));
10941056
1095 // top-right, below the corner1057 // top-right, below the corner
1096 cairo_arc(cr,1058 cairo_arc(cr,
1097 x + width - radius,1059 _align(x + width, odd) - _align(radius, odd),
1098 y + radius,1060 _align(y, odd) + _align(radius, odd),
1099 radius,1061 _align(radius, odd),
1100 -90.0f * G_PI / 180.0f,1062 -90.0f * G_PI / 180.0f,
1101 0.0f * G_PI / 180.0f);1063 0.0f * G_PI / 180.0f);
11021064
1103 // bottom-right, above the corner1065 // bottom-right, above the corner
1104 cairo_line_to(cr, x + width, y + height - radius);1066 cairo_line_to(cr, _align(x + width, odd), _align(y + height - radius, odd));
11051067
1106 // bottom-right, left of the corner1068 // bottom-right, left of the corner
1107 cairo_arc(cr,1069 cairo_arc(cr,
1108 x + width - radius,1070 _align(x + width, odd) - _align(radius, odd),
1109 y + height - radius,1071 _align(y + height, odd) - _align(radius, odd),
1110 radius,1072 _align(radius, odd),
1111 0.0f * G_PI / 180.0f,1073 0.0f * G_PI / 180.0f,
1112 90.0f * G_PI / 180.0f);1074 90.0f * G_PI / 180.0f);
11131075
1114 // bottom-left1076 // bottom-left
1115 cairo_line_to(cr, x, y + height);1077 cairo_line_to(cr, _align(x, odd), _align(y + height, odd));
11161078
1117 if (arrow == Arrow::LEFT && state == nux::VISUAL_STATE_PRESSED)1079 if (arrow == Arrow::LEFT && state == nux::VISUAL_STATE_PRESSED)
1118 {1080 {
1119 cairo_line_to(cr, x, y + height / 2.0 + arrow_h);1081 cairo_line_to(cr, _align(x, odd), _align(y + height / 2.0 + arrow_h, odd));
1120 cairo_line_to(cr, x + arrow_w, y + height / 2.0);1082 cairo_line_to(cr, _align(x + arrow_w, odd), _align(y + height / 2.0, odd));
1121 cairo_line_to(cr, x, y + height / 2.0 - arrow_h);1083 cairo_line_to(cr, _align(x, odd), _align(y + height / 2.0 - arrow_h, odd));
1122 }1084 }
11231085
1124 // back to top-left1086 // back to top-left
@@ -1563,14 +1525,26 @@
1563 //ButtonOutlinePath(cr, true);1525 //ButtonOutlinePath(cr, true);
1564 double w = cairo_image_surface_get_width(cairo_get_target(cr));1526 double w = cairo_image_surface_get_width(cairo_get_target(cr));
1565 double h = cairo_image_surface_get_height(cairo_get_target(cr));1527 double h = cairo_image_surface_get_height(cairo_get_target(cr));
1566 RoundedRect(cr,1528
1567 1.0,1529 cairo_set_line_width(cr, pimpl->button_label_border_size_[state]);
1568 (double) (garnish),1530
1569 (double) (garnish),1531 if (pimpl->button_label_border_size_[state] == 2.0)
1570 7.0,1532 RoundedRect(cr,
1571 w - (double) (2 * garnish),1533 1.0,
1572 h - (double) (2 * garnish),1534 (double) (garnish) + 1.0,
1573 true);1535 (double) (garnish) + 1.0,
1536 7.0,
1537 w - (double) (2 * garnish) - 1.0,
1538 h - (double) (2 * garnish) - 1.0);
1539 else
1540 RoundedRect(cr,
1541 1.0,
1542 (double) (garnish),
1543 (double) (garnish),
1544 7.0,
1545 w - (double) (2 * garnish),
1546 h - (double) (2 * garnish));
1547
15741548
1575 if (pimpl->button_label_fill_color_[state].alpha != 0.0)1549 if (pimpl->button_label_fill_color_[state].alpha != 0.0)
1576 {1550 {
@@ -1578,7 +1552,7 @@
1578 cairo_fill_preserve(cr);1552 cairo_fill_preserve(cr);
1579 }1553 }
1580 cairo_set_source_rgba(cr, pimpl->button_label_border_color_[state]);1554 cairo_set_source_rgba(cr, pimpl->button_label_border_color_[state]);
1581 cairo_set_line_width(cr, pimpl->button_label_border_size_[state]);1555 //cairo_set_line_width(cr, pimpl->button_label_border_size_[state]);
1582 cairo_stroke(cr);1556 cairo_stroke(cr);
15831557
1584 pimpl->DrawOverlay(cr,1558 pimpl->DrawOverlay(cr,
@@ -1707,16 +1681,30 @@
1707 w -= 2.0;1681 w -= 2.0;
1708 }1682 }
17091683
1710 pimpl->RoundedRectSegment(cr,1684 cairo_set_line_width(cr, pimpl->button_label_border_size_[state]);
1711 1.0,1685
1712 x,1686 if (pimpl->button_label_border_size_[state] == 2.0)
1713 y,1687 pimpl->RoundedRectSegment(cr,
1714 h / 4.0,1688 1.0,
1715 w,1689 x+1.0,
1716 h,1690 y+1.0,
1717 segment,1691 (h-1.0) / 4.0,
1718 arrow,1692 w-1.0,
1719 state);1693 h-1.0,
1694 segment,
1695 arrow,
1696 state);
1697 else
1698 pimpl->RoundedRectSegment(cr,
1699 1.0,
1700 x,
1701 y,
1702 h / 4.0,
1703 w,
1704 h,
1705 segment,
1706 arrow,
1707 state);
17201708
1721 if (pimpl->button_label_fill_color_[state].alpha != 0.0)1709 if (pimpl->button_label_fill_color_[state].alpha != 0.0)
1722 {1710 {
@@ -1724,7 +1712,6 @@
1724 cairo_fill_preserve(cr);1712 cairo_fill_preserve(cr);
1725 }1713 }
1726 cairo_set_source_rgba(cr, pimpl->button_label_border_color_[state]);1714 cairo_set_source_rgba(cr, pimpl->button_label_border_color_[state]);
1727 cairo_set_line_width(cr, pimpl->button_label_border_size_[state]);
1728 cairo_stroke(cr);1715 cairo_stroke(cr);
1729 pimpl->Text(cr,1716 pimpl->Text(cr,
1730 pimpl->button_label_text_color_[state],1717 pimpl->button_label_text_color_[state],
17311718
=== modified file 'plugins/unityshell/src/DashStyle.h'
--- plugins/unityshell/src/DashStyle.h 2011-10-25 16:32:49 +0000
+++ plugins/unityshell/src/DashStyle.h 2012-01-13 15:19:22 +0000
@@ -125,8 +125,7 @@
125 double y,125 double y,
126 double cornerRadius,126 double cornerRadius,
127 double width,127 double width,
128 double height,128 double height);
129 bool align);
130129
131 nux::Color const& GetTextColor() const;130 nux::Color const& GetTextColor() const;
132131
133132
=== modified file 'plugins/unityshell/src/FilterGenreWidget.cpp'
--- plugins/unityshell/src/FilterGenreWidget.cpp 2012-01-11 09:32:22 +0000
+++ plugins/unityshell/src/FilterGenreWidget.cpp 2012-01-13 15:19:22 +0000
@@ -46,10 +46,10 @@
46 genre_layout_ = new nux::GridHLayout(NUX_TRACKER_LOCATION);46 genre_layout_ = new nux::GridHLayout(NUX_TRACKER_LOCATION);
47 genre_layout_->ForceChildrenSize(true);47 genre_layout_->ForceChildrenSize(true);
48 genre_layout_->MatchContentSize(true);48 genre_layout_->MatchContentSize(true);
49 genre_layout_->SetSpaceBetweenChildren(10, 12);49 genre_layout_->SetSpaceBetweenChildren (7, 9);
50 genre_layout_->SetTopAndBottomPadding(12);50 genre_layout_->SetTopAndBottomPadding(12);
51 genre_layout_->EnablePartialVisibility(false);51 genre_layout_->EnablePartialVisibility(false);
52 genre_layout_->SetChildrenSize(Style::Instance().GetTileWidth() - 12, 32);52 genre_layout_->SetChildrenSize(Style::Instance().GetTileWidth() - 12, 33);
5353
54 SetRightHandView(all_button_);54 SetRightHandView(all_button_);
55 SetContents(genre_layout_);55 SetContents(genre_layout_);