{"id":361935,"date":"2024-05-21T01:24:07","date_gmt":"2024-05-21T01:24:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=361935"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T01:24:07","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=361935","title":{"rendered":"<span>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Granite \u043e\u0442 elementary OS<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/92d\/fda\/e1e\/92dfdae1e00502cb23dc578e417da7af.jpg\" width=\"1200\" height=\"600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/92d\/fda\/e1e\/92dfdae1e00502cb23dc578e417da7af.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0430 \u0431\u0430\u0437\u0435 \u044f\u0434\u0440\u0430 Linux. \u0411\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043a\u0443\u0441. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430\u043c\u0438, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0441\u0432\u043e\u0438.\u00a0<\/p>\n<p>\u0412 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0435 <a href=\"https:\/\/elementary.io\/ru\/\"><u>elementary OS<\/u><\/a> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Pantheon. \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0415\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442, \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f elementary OS \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0441\u0432\u043e\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Granite. \u041e\u043d\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430. \u0414\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 Libadwaita \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 GNOME. \u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 Libadwaita, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Granite. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f elementary OS \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Vala. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/elementary\/granite\"><u>\u0437\u0434\u0435\u0441\u044c<\/u><\/a>.<\/p>\n<h2>Dialog  <\/h2>\n<p>\u0414\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u043a\u043d\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u041f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"vala\">  var header = new Granite.HeaderLabel (\"Header\");   var entry = new Gtk.Entry ();   var gtk_switch = new Gtk.Switch () {       halign = Gtk.Align.START   };    var layout = new Gtk.Grid () {       row_spacing = 12   };   layout.attach (header, 0, 1);   layout.attach (entry, 0, 2);   layout.attach (gtk_switch, 0, 3);    var dialog = new Granite.Dialog () {       transient_for = window   };   dialog.content_area.add (layout);   dialog.add_button (\"Cancel\", Gtk.ResponseType.CANCEL);    var suggested_button = dialog.add_button (\"Suggested Action\", Gtk.ResponseType.ACCEPT);   suggested_button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);    dialog.show_all ();   dialog.response.connect ((response_id) => {       if (response_id == Gtk.ResponseType.ACCEPT) {           \/\/ Do Something       }        dialog.destroy ();   });<\/code><\/pre>\n<p>\u0410 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1da\/cb6\/d62\/1dacb6d62ef180e68a4c5dacac3d62e7.png\" width=\"317\" height=\"231\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1da\/cb6\/d62\/1dacb6d62ef180e68a4c5dacac3d62e7.png\"\/><\/figure>\n<h2>OverlayBar  <\/h2>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043a\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430. \u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0441\u043e \u0441\u043f\u0438\u043d\u043d\u0435\u0440\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9b1\/465\/4e1\/9b14654e1872b42a446c25ca56904f18.png\" width=\"521\" height=\"39\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9b1\/465\/4e1\/9b14654e1872b42a446c25ca56904f18.png\"\/><\/figure>\n<p>\u041f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u0435\u043a\u0430\u043d\u0438\u044f \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0422\u0430\u043a\u0430\u044f \u0448\u0442\u0443\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 AppCenter \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0436\u0435 \u043e\u043d\u0430 \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u0430 \u0438 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0435 elementary OS \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"vala\">public class OverlayBarView : Gtk.Box {     construct {         var button = new Gtk.ToggleButton.with_label (\"Show Spinner\");          \/* This is necessary to workaround an issue in the stylesheet with buttons packed directly into overlays *\/         var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) {             halign = Gtk.Align.CENTER,             valign = Gtk.Align.CENTER         };          box.append (button);          var overlay = new Gtk.Overlay () {             child = box,             hexpand = true         };          var overlaybar = new Granite.OverlayBar (overlay) {             label = \"Hover the OverlayBar to change its position\"         };          append (overlay);          button.toggled.connect (() => {             overlaybar.active = button.active;         });     } }<\/code><\/pre>\n<h2>Placeholder  <\/h2>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438\u043b\u0438 \u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 <a href=\"https:\/\/github.com\/danirabbit\/nimbus\"><u>Nimbus<\/u><\/a>:  <\/p>\n<pre><code class=\"vala\">var placeholder = new Granite.Placeholder (_(\"Unable to Get Location\")) {             icon = new ThemedIcon (\"location-disabled-symbolic\"),             description = _(\"Make sure location access is turned on in &lt;a href='settings:\/\/privacy\/location'>System Settings \u2192 Security &amp;amp; Privacy&lt;\/a>\")         };<\/code><\/pre>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/830\/320\/b70\/830320b7090284507ff8e03e3d4a26fa.png\" width=\"459\" height=\"309\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/830\/320\/b70\/830320b7090284507ff8e03e3d4a26fa.png\"\/><\/figure>\n<h2>MessageDialog<\/h2>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u043d\u0430:  <\/p>\n<pre><code class=\"vala\">private void alert (string str){         var dialog = new Granite.MessageDialog.with_image_from_icon_name (_(\"Message\"), str, \"dialog-warning\");         dialog.show_all ();         dialog.run ();         dialog.destroy ();        }<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 <a href=\"https:\/\/github.com\/alexkdeveloper\/raddiola\"><u>Raddiola<\/u><\/a>:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9f3\/679\/787\/9f36797875c9aa6d859ce335d05e94c1.png\" width=\"399\" height=\"300\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9f3\/679\/787\/9f36797875c9aa6d859ce335d05e94c1.png\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0438\u0435 \u0434\u0438\u0430\u043b\u043e\u0433\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"vala\"> private void show_message_dialog () {    var message_dialog = new Granite.MessageDialog.with_image_from_icon_name (             \"Basic information and a suggestion\",             \"Further details, including information that explains any unobvious consequences of actions.\",             \"phone\",             Gtk.ButtonsType.CANCEL         );         message_dialog.badge_icon = new ThemedIcon (\"dialog-information\");         message_dialog.transient_for = window;          var suggested_button = new Gtk.Button.with_label (\"Suggested Action\");         suggested_button.get_style_context ().add_class (Granite.STYLE_CLASS_SUGGESTED_ACTION);         message_dialog.add_action_widget (suggested_button, Gtk.ResponseType.ACCEPT);          var custom_widget = new Gtk.CheckButton.with_label (\"Custom widget\");          message_dialog.show_error_details (\"The details of a possible error.\");         message_dialog.custom_bin.append (custom_widget);          message_dialog.response.connect ((response_id) => {            if (response_id == Gtk.ResponseType.ACCEPT) {                toast.send_notification ();            }             message_dialog.destroy ();         });          message_dialog.show ();     }<\/code><\/pre>\n<p>\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0442\u0430\u043a\u043e\u0433\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u043d\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/685\/a30\/49c\/685a3049cf51b611e3742bdc2062682a.png\" width=\"549\" height=\"383\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/685\/a30\/49c\/685a3049cf51b611e3742bdc2062682a.png\"\/><\/figure>\n<h2>Toast<\/h2>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043a\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043a\u043d\u043e\u043f\u043e\u043a. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6f1\/566\/4b1\/6f15664b14b317fd99780df1d2f0cd47.png\" width=\"306\" height=\"57\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6f1\/566\/4b1\/6f15664b14b317fd99780df1d2f0cd47.png\"\/><\/figure>\n<p>\u041a\u043e\u0434:<\/p>\n<pre><code class=\"vala\">public class ToastView : Gtk.Box {     construct {         halign = Gtk.Align.CENTER;          var overlay = new Gtk.Overlay ();          var toast = new Granite.Toast (_(\"Button was pressed!\"));         toast.set_default_action (_(\"Do Things\"));          var button = new Gtk.Button.with_label (_(\"Press Me\"));          var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {             margin_start = 24,             margin_end = 24,             margin_top = 24,             margin_bottom = 24,             halign = Gtk.Align.CENTER,             valign = Gtk.Align.CENTER         };         box.append (button);          overlay.add_overlay (box);         overlay.add_overlay (toast);         overlay.set_measure_overlay (toast, true);          button.clicked.connect (() => {             toast.send_notification ();         });          toast.default_action.connect (() => {             var label = new Gtk.Label (_(\"Did The Thing\"));             toast.title = _(\"Already did the thing\");             toast.set_default_action (null);             box.append (label);         });          append (overlay);     } }<\/code><\/pre>\n<h2>ModeSwitch \u0438 SwitchModelButton<\/h2>\n<p>ModeSwitch \u2014 \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0435\u043c\u044b \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0435\u043c\u043d\u0443\u044e \u0438\u043b\u0438 \u0441\u0432\u0435\u0442\u043b\u0443\u044e \u0442\u0435\u043c\u0443. \u0414\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/28c\/8c3\/30f\/28c8c330f9421c2566026b8fa28205fe.png\" width=\"149\" height=\"72\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/28c\/8c3\/30f\/28c8c330f9421c2566026b8fa28205fe.png\"\/><\/figure>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u0430 \u0448\u0442\u0443\u043a\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u0435\u0435 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>SwitchModelButton \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c. \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438. \u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ea0\/8aa\/ff7\/ea08aaff727bd5bbdf9a54583de40a65.png\" width=\"280\" height=\"202\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea0\/8aa\/ff7\/ea08aaff727bd5bbdf9a54583de40a65.png\"\/><\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0432\u0435\u0449\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0440\u044b\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"vala\">public class ModeButtonView : Gtk.Box {     construct {         var mode_switch_label = new Gtk.Label (\"ModeSwitch\");         mode_switch_label.halign = Gtk.Align.START;         mode_switch_label.margin_top = 12;         mode_switch_label.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL);          var mode_switch = new Granite.ModeSwitch.from_icon_name (             \"display-brightness-symbolic\",             \"weather-clear-night-symbolic\"         );         mode_switch.primary_icon_tooltip_text = (\"Light background\");         mode_switch.secondary_icon_tooltip_text = (\"Dark background\");         mode_switch.valign = Gtk.Align.CENTER;          var switchbutton_header = new Gtk.Label (\"SwitchModelButton\") {             margin_top = 12,             halign = Gtk.Align.START,             xalign = 0,         };         switchbutton_header.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL);          var header_switchmodelbutton = new Granite.SwitchModelButton (\"Header\");         header_switchmodelbutton.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL);          var switchmodelbutton = new Granite.SwitchModelButton (\"Default\");          var description_switchmodelbutton = new Granite.SwitchModelButton (\"With Description\") {             active = true,             description = \"A description of additional affects related to the activation state of this switch\"         };          var switchbutton_grid = new Gtk.Grid () {             margin_top = 3,             margin_bottom = 3         };         switchbutton_grid.attach (header_switchmodelbutton, 0, 0);         switchbutton_grid.attach (switchmodelbutton, 0, 1);         switchbutton_grid.attach (description_switchmodelbutton, 0, 2);          var switchbutton_popover = new Gtk.Popover () {             child = switchbutton_grid         };          var popover_button = new Gtk.MenuButton () {             direction = Gtk.ArrowType.UP         };         popover_button.popover = switchbutton_popover;          spacing = 6;         orientation = Gtk.Orientation.VERTICAL;         halign = Gtk.Align.CENTER;         valign = Gtk.Align.CENTER;         append (mode_switch_label);         append (mode_switch);         append (switchbutton_header);         append (popover_button);     } }<\/code><\/pre>\n<h2>DatePicker \u0438 TimePicker<\/h2>\n<p>DatePicker \u2014 \u044d\u0442\u043e \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0434\u0430\u0442\u044b, \u0430 TimePicker \u2014 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435:<\/p>\n<pre><code class=\"vala\">           var date_picker = new Granite.Widgets.DatePicker.with_format(                 Granite.DateTime.get_default_date_format(false, true, true)             );              var time_picker = new Granite.Widgets.TimePicker.with_format(                 Granite.DateTime.get_default_time_format(true),                  Granite.DateTime.get_default_time_format(false)             );              var date_time_container = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 5);             date_time_container.pack_start(date_picker, true, true, 0);             date_time_container.pack_start(time_picker, true, true, 0);<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0432 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043a\u0430\u043a \u0441\u043f\u0438\u0441\u043a\u0438 \u0437\u0430\u0434\u0430\u0447, \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u0438, \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043a\u0438 \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u044d\u0442\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/abb\/444\/4b0\/abb4444b0867ade5448d679f745e3276.png\" width=\"427\" height=\"38\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/abb\/444\/4b0\/abb4444b0867ade5448d679f745e3276.png\"\/><\/figure>\n<h2>ValidatedEntry<\/h2>\n<p>\u041f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0432\u0432\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u043e\u043d \u0432\u0432\u0435\u043b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"vala\">  Regex? regex = null;   ValidatedEntry only_lower_case_letters_entry;   try {       regex = new Regex (\"^[a-z]*$\");       only_lower_case_letters_entry = new ValidatedEntry.from_regex (regex);   } catch (Error e) {       critical (e.message);       \/\/ Provide a fallback entry   }<\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430. \u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0432\u0438\u0434\u0436\u0435\u0442\u0430:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/822\/35c\/b7c\/82235cb7ccf81f98598dae1d31fa2850.png\" width=\"205\" height=\"68\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/822\/35c\/b7c\/82235cb7ccf81f98598dae1d31fa2850.png\"\/><\/figure>\n<h2>Welcome<\/h2>\n<p>\u041e\u043a\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0438\u0433\u0440\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u0433\u0440\u044b \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u043e\u043a\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u0443\u044e \u0438\u0433\u0440\u0443 \u0438\u043b\u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u0438\u0433\u0440\u0435 <a href=\"https:\/\/github.com\/unbelievableflavour\/sudokular\"><u>Sudokular<\/u><\/a>:<\/p>\n<pre><code class=\"vala\"> var welcome_view = new Welcome (_(\"Sudokular\"), \"\");         welcome_view.append (\"\", _(\"New game\"), _(\"Choose difficulty and start a new puzzle\"));          var settings = new SudokuSettings ();         var sudoku_board = new SudokuBoard.from_string (settings.load ());          if (settings.load () != null &amp;&amp; !sudoku_board.isFinshed ()) {             welcome_view.append (\"\", _(\"Resume game\"), _(\"Return to where you left off.\"));         }<\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0443 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/db3\/a1d\/af3\/db3a1daf322c25267f5eea6a7b1305fd.png\" width=\"408\" height=\"339\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/db3\/a1d\/af3\/db3a1daf322c25267f5eea6a7b1305fd.png\"\/><\/figure>\n<h2>HyperTextView<\/h2>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 GtkTextView, \u0441\u0434\u0435\u043b\u0430\u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e URL-\u0430\u0434\u0440\u0435\u0441\u0430. \u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b6a\/fa1\/633\/b6afa1633e306139b8bbd8e4ba67e303.png\" width=\"629\" height=\"352\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b6a\/fa1\/633\/b6afa1633e306139b8bbd8e4ba67e303.png\"\/><\/figure>\n<p>\u041a\u043e\u0434:<\/p>\n<pre><code class=\"vala\">public class HyperTextViewGrid : Gtk.Box {     construct {         var hypertext_label = new Gtk.Label (\"Hold Ctrl and click to follow the link\") {             halign = Gtk.Align.START,             xalign = 0         };         hypertext_label.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL);          var hypertext_textview = new Granite.HyperTextView ();         hypertext_textview.buffer.text = \"elementary OS - https:\/\/elementary.io\/\\nThe fast, open and privacy-respecting replacement for Windows and macOS.\";          var hypertext_scrolled_window = new Gtk.ScrolledWindow () {             height_request = 300,             width_request = 600,             child = hypertext_textview         };          margin_start = margin_end = margin_top = margin_bottom = 12;         orientation = Gtk.Orientation.VERTICAL;         spacing = 3;         halign = Gtk.Align.CENTER;         valign = Gtk.Align.CENTER;         vexpand = true;         append (hypertext_label);         append (hypertext_scrolled_window);     } }<\/code><\/pre>\n<p>\u0421 \u044d\u0442\u0438\u043c\u0438 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/valadoc.org\/granite-7\/index.htm\"><u>\u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/u><\/a>. \u041d\u0430 \u043d\u0435\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0432\u0435\u0436\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (granite-7). \u0421 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <a href=\"https:\/\/valadoc.org\/granite\/Granite.html\"><u>\u0437\u0434\u0435\u0441\u044c<\/u><\/a>. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u0432\u0435\u0436\u0430\u044f, \u043e\u043d\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0414\u0430\u0436\u0435 \u0440\u043e\u0434\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 \u043d\u0435 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Granite.<\/p>\n<h2>\u0427\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Granite \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0443 GNOME Builder. \u041d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f GTK. \u0415\u0441\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c GNOME, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f Libadwaita, \u0430 \u044d\u0442\u043e \u043d\u0430\u043c \u043d\u0435 \u043d\u0430\u0434\u043e. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Libadwaita \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f elementary OS.\u00a0<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Granite \u0432 \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 meson.build:<\/p>\n<p><code>dependency('granite-7')<\/code>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f elementary OS \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 flatpak, \u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u043d\u0435\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0438 Sdk \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 elementary:  <\/p>\n<pre><code class=\"vala\">    \"runtime\": \"io.elementary.Platform\",     \"runtime-version\": \"7.2\",     \"sdk\": \"io.elementary.Sdk\",<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Granite \u0431\u044b\u043b\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u0434 elementary OS, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 elementary.Sdk, \u0438 \u0435\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0445\u043e\u0447\u0435\u0442 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432 AppCenter, \u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a GTK \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u0437 Granite \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b, \u043d\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b.\u00a0<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 GNOME. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 gnome.Sdk, \u0442\u043e \u0435\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 6.2.0:<\/p>\n<pre><code class=\"vala\">          {              \"name\": \"granite\",             \"buildsystem\": \"meson\",             \"sources\": [               {                 \"type\": \"git\",                 \"url\": \"https:\/\/github.com\/elementary\/granite.git\",                 \"tag\": \"6.2.0\",                 \"commit\": \"4ab145c28bb3db6372fe519e8bd79c645edfcda3\"               }             ]          }<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f <a href=\"https:\/\/github.com\/alexkdeveloper\/sudoku\"><u>Sudoku<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u043c Sudokular. \u041f\u0435\u0440\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Sudoku \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 Granite.Widgets.Welcome, \u043d\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043e\u0442 \u043d\u0435\u0433\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e GtkBox.<\/p>\n<p>\u041d\u0430 <a href=\"https:\/\/appcenter.elementary.io\/\"><u>\u044d\u0442\u043e\u043c \u0441\u0430\u0439\u0442\u0435<\/u><\/a> \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432\u0441\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 elementary OS. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u043c\u043d\u043e\u0433\u043e. \u041c\u043d\u043e\u0433\u043e \u0437\u0430\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. \u041d\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u043e. \u0412\u043e\u043e\u0431\u0449\u0435, \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f elementary OS. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0437\u0430\u0431\u0440\u043e\u0441\u044f\u0442 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p><strong>\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438 <\/strong><a href=\"https:\/\/habr.com\/users\/kalexal\"><strong><u>@KAlexAl<\/u><\/strong><\/a><\/p>\n<hr\/>\n<p>\u041d\u041b\u041e \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u043e \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043b\u043e\u0433\u0430:<br \/><a href=\"https:\/\/firstvds.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=product&amp;utm_content=vds15exeptprogrev\"><strong><u>-15% \u043d\u0430 \u0437\u0430\u043a\u0430\u0437 \u043b\u044e\u0431\u043e\u0433\u043e VDS<\/u><\/strong><\/a><strong>\u00a0<\/strong>(\u043a\u0440\u043e\u043c\u0435 \u0442\u0430\u0440\u0438\u0444\u0430 \u041f\u0440\u043e\u0433\u0440\u0435\u0432) \u2014\u00a0<strong>HABRFIRSTVDS<\/strong>.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/778244\/\"> https:\/\/habr.com\/ru\/articles\/778244\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0430 \u0431\u0430\u0437\u0435 \u044f\u0434\u0440\u0430 Linux. \u0411\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043a\u0443\u0441. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430\u043c\u0438, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0441\u0432\u043e\u0438.\u00a0<\/p>\n<p>\u0412 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0435 <a href=\"https:\/\/elementary.io\/ru\/\"><u>elementary OS<\/u><\/a> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Pantheon. \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0415\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442, \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f elementary OS \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0441\u0432\u043e\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Granite. \u041e\u043d\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430. \u0414\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 Libadwaita \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 GNOME. \u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 Libadwaita, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Granite. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f elementary OS \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Vala. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/elementary\/granite\"><u>\u0437\u0434\u0435\u0441\u044c<\/u><\/a>.<\/p>\n<h2>Dialog  <\/h2>\n<p>\u0414\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u043a\u043d\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u041f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"vala\">  var header = new Granite.HeaderLabel (\"Header\");   var entry = new Gtk.Entry ();   var gtk_switch = new Gtk.Switch () {       halign = Gtk.Align.START   };    var layout = new Gtk.Grid () {       row_spacing = 12   };   layout.attach (header, 0, 1);   layout.attach (entry, 0, 2);   layout.attach (gtk_switch, 0, 3);    var dialog = new Granite.Dialog () {       transient_for = window   };   dialog.content_area.add (layout);   dialog.add_button (\"Cancel\", Gtk.ResponseType.CANCEL);    var suggested_button = dialog.add_button (\"Suggested Action\", Gtk.ResponseType.ACCEPT);   suggested_button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);    dialog.show_all ();   dialog.response.connect ((response_id) => {       if (response_id == Gtk.ResponseType.ACCEPT) {           \/\/ Do Something       }        dialog.destroy ();   });<\/code><\/pre>\n<p>\u0410 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<figure class=\"\"><\/figure>\n<h2>OverlayBar  <\/h2>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043a\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430. \u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0441\u043e \u0441\u043f\u0438\u043d\u043d\u0435\u0440\u043e\u043c:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u0435\u043a\u0430\u043d\u0438\u044f \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0422\u0430\u043a\u0430\u044f \u0448\u0442\u0443\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 AppCenter \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0436\u0435 \u043e\u043d\u0430 \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u0430 \u0438 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0435 elementary OS \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"vala\">public class OverlayBarView : Gtk.Box {     construct {         var button = new Gtk.ToggleButton.with_label (\"Show Spinner\");          \/* This is necessary to workaround an issue in the stylesheet with buttons packed directly into overlays *\/         var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) {             halign = Gtk.Align.CENTER,             valign = Gtk.Align.CENTER         };          box.append (button);          var overlay = new Gtk.Overlay () {             child = box,             hexpand = true         };          var overlaybar = new Granite.OverlayBar (overlay) {             label = \"Hover the OverlayBar to change its position\"         };          append (overlay);          button.toggled.connect (() => {             overlaybar.active = button.active;         });     } }<\/code><\/pre>\n<h2>Placeholder  <\/h2>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438\u043b\u0438 \u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 <a href=\"https:\/\/github.com\/danirabbit\/nimbus\"><u>Nimbus<\/u><\/a>:  <\/p>\n<pre><code class=\"vala\">var placeholder = new Granite.Placeholder (_(\"Unable to Get Location\")) {             icon = new ThemedIcon (\"location-disabled-symbolic\"),             description = _(\"Make sure location access is turned on in &lt;a href='settings:\/\/privacy\/location'>System Settings \u2192 Security &amp;amp; Privacy&lt;\/a>\")         };<\/code><\/pre>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><\/figure>\n<h2>MessageDialog<\/h2>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u043d\u0430:  <\/p>\n<pre><code class=\"vala\">private void alert (string str){         var dialog = new Granite.MessageDialog.with_image_from_icon_name (_(\"Message\"), str, \"dialog-warning\");         dialog.show_all ();         dialog.run ();         dialog.destroy ();        }<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 <a href=\"https:\/\/github.com\/alexkdeveloper\/raddiola\"><u>Raddiola<\/u><\/a>:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0422\u0430\u043a\u0438\u0435 \u0434\u0438\u0430\u043b\u043e\u0433\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"vala\"> private void show_message_dialog () {    var message_dialog = new Granite.MessageDialog.with_image_from_icon_name (             \"Basic information and a suggestion\",             \"Further details, including information that explains any unobvious consequences of actions.\",             \"phone\",             Gtk.ButtonsType.CANCEL         );         message_dialog.badge_icon = new ThemedIcon (\"dialog-information\");         message_dialog.transient_for = window;          var suggested_button = new Gtk.Button.with_label (\"Suggested Action\");         suggested_button.get_style_context ().add_class (Granite.STYLE_CLASS_SUGGESTED_ACTION);         message_dialog.add_action_widget (suggested_button, Gtk.ResponseType.ACCEPT);          var custom_widget = new Gtk.CheckButton.with_label (\"Custom widget\");          message_dialog.show_error_details (\"The details of a possible error.\");         message_dialog.custom_bin.append (custom_widget);          message_dialog.response.connect ((response_id) => {            if (response_id == Gtk.ResponseType.ACCEPT) {                toast.send_notification ();            }             message_dialog.destroy ();         });          message_dialog.show ();     }<\/code><\/pre>\n<p>\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0442\u0430\u043a\u043e\u0433\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u043d\u0430:<\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>Toast<\/h2>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043a\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043a\u043d\u043e\u043f\u043e\u043a. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041a\u043e\u0434:<\/p>\n<pre><code class=\"vala\">public class ToastView : Gtk.Box {     construct {         halign = Gtk.Align.CENTER;          var overlay = new Gtk.Overlay ();          var toast = new Granite.Toast (_(\"Button was pressed!\"));         toast.set_default_action (_(\"Do Things\"));          var button = new Gtk.Button.with_label (_(\"Press Me\"));          var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {             margin_start = 24,             margin_end = 24,             margin_top = 24,             margin_bottom = 24,             halign = Gtk.Align.CENTER,             valign = Gtk.Align.CENTER         };         box.append (button);          overlay.add_overlay (box);         overlay.add_overlay (toast);         overlay.set_measure_overlay (toast, true);          button.clicked.connect (() => {             toast.send_notification ();         });          toast.default_action.connect (() => {             var label = new Gtk.Label (_(\"Did The Thing\"));             toast.title = _(\"Already did the thing\");             toast.set_default_action (null);             box.append (label);         });          append (overlay);     } }<\/code><\/pre>\n<h2>ModeSwitch \u0438 SwitchModelButton<\/h2>\n<p>ModeSwitch \u2014 \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0435\u043c\u044b \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0435\u043c\u043d\u0443\u044e \u0438\u043b\u0438 \u0441\u0432\u0435\u0442\u043b\u0443\u044e \u0442\u0435\u043c\u0443. \u0414\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u0430 \u0448\u0442\u0443\u043a\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u0435\u0435 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>SwitchModelButton \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c. \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438. \u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0432\u0435\u0449\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0440\u044b\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"vala\">public class ModeButtonView : Gtk.Box {     construct {         var mode_switch_label = new Gtk.Label (\"ModeSwitch\");         mode_switch_label.halign = Gtk.Align.START;         mode_switch_label.margin_top = 12;         mode_switch_label.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL);          var mode_switch = new Granite.ModeSwitch.from_icon_name (             \"display-brightness-symbolic\",             \"weather-clear-night-symbolic\"         );         mode_switch.primary_icon_tooltip_text = (\"Light background\");         mode_switch.secondary_icon_tooltip_text = (\"Dark background\");         mode_switch.valign = Gtk.Align.CENTER;          var switchbutton_header = new Gtk.Label (\"SwitchModelButton\") {             margin_top = 12,             halign = Gtk.Align.START,             xalign = 0,         };         switchbutton_header.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL);          var header_switchmodelbutton = new Granite.SwitchModelButton (\"Header\");         header_switchmodelbutton.get_style_context ().add_class (Granite.STYLE_CLASS_H4_LABEL);          var switchmodelbutton = new Granite.SwitchModelButton (\"Default\");          var description_switchmodelbutton = new Granite.SwitchModelButton (\"With Description\") {             active = true,             description = \"A description of additional affects related to the activation state of this switch\"         };          var switchbutton_grid = new Gtk.Grid () {             margin_top = 3,             margin_bottom = 3         };         switchbutton_grid.attach (header_switchmodelbutton, 0, 0);         switchbutton_grid.attach (switchmodelbutton, 0, 1);         switchbutton_grid.attach (description_switchmodelbutton, 0, 2);          var switchbutton_popover = new Gtk.Popover () {             child = switchbutton_grid         };          var popover_button = new Gtk.MenuButton () {             direction = Gtk.ArrowType.UP         };         popover_button.popover = switchbutton_popover;          spacing = 6;         orientation = Gtk.Orientation.VERTICAL;         halign = Gtk.Align.CENTER;<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-361935","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361935","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=361935"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361935\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=361935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=361935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=361935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}