{"action":"created","issue":{"url":"https://api.github.com/repos/mate-desktop/mate-panel/issues/856","repository_url":"https://api.github.com/repos/mate-desktop/mate-panel","labels_url":"https://api.github.com/repos/mate-desktop/mate-panel/issues/856/labels{/name}","comments_url":"https://api.github.com/repos/mate-desktop/mate-panel/issues/856/comments","events_url":"https://api.github.com/repos/mate-desktop/mate-panel/issues/856/events","html_url":"https://github.com/mate-desktop/mate-panel/pull/856","id":352926820,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMTEzNTcx","number":856,"title":"Fix on wide panels (vert/horz)","user":{"login":"braikar","id":13189097,"node_id":"MDQ6VXNlcjEzMTg5MDk3","avatar_url":"https://avatars3.githubusercontent.com/u/13189097?v=4","gravatar_id":"","url":"https://api.github.com/users/braikar","html_url":"https://github.com/braikar","followers_url":"https://api.github.com/users/braikar/followers","following_url":"https://api.github.com/users/braikar/following{/other_user}","gists_url":"https://api.github.com/users/braikar/gists{/gist_id}","starred_url":"https://api.github.com/users/braikar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braikar/subscriptions","organizations_url":"https://api.github.com/users/braikar/orgs","repos_url":"https://api.github.com/users/braikar/repos","events_url":"https://api.github.com/users/braikar/events{/privacy}","received_events_url":"https://api.github.com/users/braikar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":74,"created_at":"2018-08-22T12:14:26Z","updated_at":"2018-10-19T23:17:15Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mate-desktop/mate-panel/pulls/856","html_url":"https://github.com/mate-desktop/mate-panel/pull/856","diff_url":"https://github.com/mate-desktop/mate-panel/pull/856.diff","patch_url":"https://github.com/mate-desktop/mate-panel/pull/856.patch"},"body":"This takes care of some issues from https://github.com/mate-desktop/mate-panel/issues/157\r\nAnd it's a final remake of the own issue I had created: https://github.com/mate-desktop/mate-panel/pull/325 (at the time mate-panel was being ported to Gtk3 so it was messy, now that it's finally only Gtk3, I've made the proper changes)\r\n\r\nThis change limits the size taken by all BUTTON_WIDGETs when the panel is wide, because for the moment when for example the panel is horizontal 200 pixels wide/high, the widgets take up 200x200 for an icon of max size 48.\r\nI've set it to take now (for this example) 50x200 or 200x50 (if it's a vertical panel 200px wide)\r\nIf users want to leave the same space as before around the icons they just have to move them on the panel anyway and leave empty space around and it can be as before.. (but it might affect other applets I don't know of)\r\nThe GTK_ARROW is also resized properly on BUTTON_WIDGETs with property \"has_arrow\"\r\n\r\nI've setup 50 as a limit, because I found by my own surprise 48 was hardcoded as the limit for the icon size.\r\nFor further discussion:\r\nCouldn't it be a panel wide user set option, so that the user sets the maximum icon size somewhere and we can get the value in any applet needing it?\r\nI though about changing the panel properties dialog and add a new option like 'max_icon_size' or something like that, so that the user decides on the maximum icon size him/herself. Then that would be saved in the gsettings of the panel.\r\nBut getting that value as a gsettings from \"org.mate.panel..\" in any applet that needs it doesn't seem to be the right way to do it? I haven't seen a single applet accessing the main panel gsettings it is attached to..?\r\n\r\n![changes](https://user-images.githubusercontent.com/13189097/44319716-d4813d00-a43d-11e8-9ca5-7817ba276244.png)\r\n\r\nThen it also finally sets the way for a notification area that should make everyone happy.\r\nI replaced the GtkBox that has been there since forever by a GtkGrid.\r\n\r\n![screenshot at 2018-08-21 14-05-58](https://user-images.githubusercontent.com/13189097/44400446-780c4380-a54b-11e8-80b0-1c47bc426be9.png)\r\nAs you can see I added a Preferences dialog, with two options, a tick box to keep them aligned on one line as it was before, they automatically resize to the width of the panel, up to 48px (icon size) centered (the change I made in BUTTON_WIDGETs applies now on the notification area items too, they don't take up 200x200 on a wide panel anymore).\r\nAnd if the \"Display icons only on one line\" is unticked, one can choose the size of the icons directly and they'll re-arrange nicely in a gird.\r\nAs you can see the two examples where I set 28 size for one and 43 for the other. They don't adapt to all sizes though, once the size is big enough or small enough to fill the width/height, it resizes..\r\nAnd as you can see the settings are set in a GSchema. I'll just need help to figure out how to change the Makefile to automatically compile it, I've spent hours on it without figuring it out. I installed the GSchema manually..\r\n![screenshot at 2018-08-21 14-14-01](https://user-images.githubusercontent.com/13189097/44400829-ed2c4880-a54c-11e8-8aa3-139ac783931e.png)\r\n\r\nPROBLEMS left:\r\nThe makefile is buggy, I couldn't figure out how to get the gschema file to compile and be included in the mape-panel package, somehow it is left out, in the build process dpkg doesn't validate it?\r\nSo to test it, you need to install the new notification_area gschema manually for the moment\r\nIf someone could help, I'm not a pro of makefiles ;)\r\nElse the main problems left are in finishing the event handlers, the grid doesn't redraw when the panel loads for the first time. I don't know which event to target? realize? size-allocate?\r\nThe grid doesn't redraw properly when the panel size is modified, same, I don't know which event to target for that change.\r\nAnd the grid sorting code of the icons is a bit messy `reorder_items_with_data, refresh_grid` in `na-grid.c`. I'm sure it can be made much more neatly, but since I'm leaving for 3 weeks to a place with no internet in 3 days, I'm already publishing it so that anyone else who wants can work on it. I'll get back to it when I come back\r\n\r\nOne small thing is that the GtkDialog for preferences is not attached to a parent hence it produces:\r\n\"GtkDialog mapped without a transient parent. This is discouraged.\" in the syslog\r\nI took parts of the code from the clock applet, hence the clock applet has the same issue.\r\n\r\nI also had to coment out the na-resource.c/na-resource.h stuff in the actual Makefile, because these files don't exist as of yet?\r\n"},"comment":{"url":"https://api.github.com/repos/mate-desktop/mate-panel/issues/comments/431525046","html_url":"https://github.com/mate-desktop/mate-panel/pull/856#issuecomment-431525046","issue_url":"https://api.github.com/repos/mate-desktop/mate-panel/issues/856","id":431525046,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTUyNTA0Ng==","user":{"login":"raveit65","id":961604,"node_id":"MDQ6VXNlcjk2MTYwNA==","avatar_url":"https://avatars3.githubusercontent.com/u/961604?v=4","gravatar_id":"","url":"https://api.github.com/users/raveit65","html_url":"https://github.com/raveit65","followers_url":"https://api.github.com/users/raveit65/followers","following_url":"https://api.github.com/users/raveit65/following{/other_user}","gists_url":"https://api.github.com/users/raveit65/gists{/gist_id}","starred_url":"https://api.github.com/users/raveit65/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raveit65/subscriptions","organizations_url":"https://api.github.com/users/raveit65/orgs","repos_url":"https://api.github.com/users/raveit65/repos","events_url":"https://api.github.com/users/raveit65/events{/privacy}","received_events_url":"https://api.github.com/users/raveit65/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T23:17:15Z","updated_at":"2018-10-19T23:17:15Z","author_association":"MEMBER","body":"yes."}}
{"actor":{"display_login":"raveit65"}}