Updated system menus patches
[webos-internals:modifications.git] / top-bar / top-bar-system-menu-today-menu.patch
1 --- .orig/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
2 +++ /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
3 @@ -557,19 +557,19 @@
4  
5  showTodayMenu: function(edit) {
6  
7 -//     var stageController = Mojo.Controller.getAppController().getStageProxy("TodayMenu");
8 -//     if (stageController) {
9 -//             this.hideSystemMenus("today");
10 -//             stageController.delegateToSceneAssistant("toggleTodayMenu", edit);                      
11 -//     } else {
12 -//             this.todayMenuCreatedHandler = this.todayMenuCreated.bind(this);
13 -//             Mojo.Controller.getAppController().createStageWithCallback({name:"TodayMenu",lightweight: true}, 
14 -//                     this.todayMenuCreatedHandler, "menu");
15 -//     }
16 +       var stageController = Mojo.Controller.getAppController().getStageProxy("TodayMenu");
17 +       if (stageController) {
18 +               this.hideSystemMenus("today");
19 +               stageController.delegateToSceneAssistant("toggleTodayMenu", edit);                      
20 +       } else {
21 +               this.todayMenuCreatedHandler = this.todayMenuCreated.bind(this);
22 +               Mojo.Controller.getAppController().createStageWithCallback({name:"TodayMenu",lightweight: true}, 
23 +                       this.todayMenuCreatedHandler, "menu");
24 +       }
25  },
26  
27  todayMenuCreated: function(stageController) {
28 -//     stageController.pushScene('todaymenu',this);
29 +       stageController.pushScene('todaymenu',this);
30  },
31  
32  // Device menu
33 --- .orig/usr/lib/luna/system/luna-systemui/sources.json
34 +++ /usr/lib/luna/system/luna-systemui/sources.json
35 @@ -9,6 +9,9 @@
36      "source": "app\/controllers\/devicemenu-assistant.js"
37    },  
38    {
39 +    "source": "app\/controllers\/todaymenu-assistant.js"
40 +  },  
41 +  {
42      "source": "app\/controllers\/pbapalert-assistant.js"
43    },
44    {
45 --- .orig/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
46 +++ /usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
47 @@ -417,3 +417,48 @@
48                 padding: 0;
49  }
50  
51 +/* Make today menu items with smaller font and lower row height */
52 +
53 +#palm-today-menu #menu_items .palm-row,
54 +#palm-today-menu #edit_items .palm-row {
55 +       line-height: 42px;
56 +       min-height: 46px;
57 +       max-height: 46px;
58 +       margin:0px;
59 +       padding:0px;
60 +}
61 +
62 +#palm-today-menu #menu_items .palm-row .title,
63 +#palm-today-menu #edit_items .palm-row .title {
64 +       line-height: 42px;
65 +       min-height: 46px;
66 +       font-size: 18px;
67 +       margin: 0px 0px 0px 16px;
68 +       padding: 0px 0px 0px 0px;
69 +}
70 +
71 +#palm-today-menu #menu_items .palm-row .label,
72 +#palm-today-menu #edit_items .palm-row .label {
73 +       line-height: 42px;
74 +       min-height: 46px;
75 +       margin: 0px 16px 0px 0px;
76 +       padding: 0px 0px 0px 5px;
77 +}
78 +
79 +/* HACK: could not find a way to limit height of the selected row */
80 +
81 +#palm-today-menu #menu_items .palm-row.selected,
82 +#palm-today-menu #edit_items .palm-row.selected {
83 +       position: relative;
84 +       top:-2px;
85 +}
86 +#palm-today-menu #menu_items .palm-row.selected .title,
87 +#palm-today-menu #edit_items .palm-row.selected .title {
88 +       padding: 2px 0px 0px 0px;
89 +}
90 +
91 +#palm-today-menu #menu_items .palm-row.selected .label,
92 +#palm-today-menu #edit_items .palm-row.selected .label {
93 +       padding: 2px 0px 0px 5px;
94 +}
95 +