【Bug】Ubuntu 18.04頂端面板如果取消「Application Menu」 [論壇 - Ubuntu 養蟲箱 - bug share]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊

« 1 (2)


回覆: 【Bug】Ubuntu 18.04頂端面板如果取消「Application Menu」
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29259
EXP: 6
離線
## 觀察報告

紀錄目前觀察到的,

看起來套用在「svg」,就會出現這樣的現象,

雖然「icon-theme」是設定「ubuntu-mono-dark」

但因為「ubuntu-mono-dark」沒有「utilities-terminal」,

而觀察到「gtk」有「fallback」機制,看起來是套用到「Humanity」的「utilities-terminal」,

而「Humanity」的「utilities-terminal」是「svg」

所以就會發生樓主在「#1」提到的情形

您也可以做個小實驗,安裝「breeze-icon-theme」,

裡面的「icon」也都是「svg」的格式,

可以測測看,「icon-theme」套用「Breeze」,就會看到樓主提到的那個情形。

所以目前我想到最簡單的解決方式,就是我一開始提到的,安裝「gnome-icon-theme」。

在「gnome-icon-theme」的「tilities-terminal」,格式是「png」

標題列的「icon」顯示就是正常的,(即使「icon-theme」不是設定「gnome」)。

================================================================================

## 探索「/usr/share/icons/ubuntu-mono-dark」

執行


$ find /usr/share/icons/ubuntu-mono-dark | grep utilities-terminal



沒有任何顯示

================================================================================

## 探索「/usr/share/icons/Humanity」

執行


$ find /usr/share/icons/Humanity | grep utilities-terminal



顯示


/usr/share/icons/Humanity/apps/48/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/48/utilities-terminal.svg
/usr/share/icons/Humanity/apps/24/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/24/utilities-terminal.svg
/usr/share/icons/Humanity/apps/32/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/32/utilities-terminal.svg
/usr/share/icons/Humanity/apps/64/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/64/utilities-terminal.svg
/usr/share/icons/Humanity/apps/22/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/22/utilities-terminal.svg
/usr/share/icons/Humanity/apps/16/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/16/utilities-terminal.svg
/usr/share/icons/Humanity/apps/128/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/128/utilities-terminal.svg



================================================================================

## 探索「/usr/share/icons/breeze」

執行


$ find /usr/share/icons/breeze | grep utilities-terminal



顯示


/usr/share/icons/breeze/apps/48/utilities-terminal.svg
/usr/share/icons/breeze/apps/32/utilities-terminal.svg
/usr/share/icons/breeze/apps/64/utilities-terminal.svg
/usr/share/icons/breeze/apps/22/utilities-terminal.svg
/usr/share/icons/breeze/apps/16/utilities-terminal.svg



## 探索「/usr/share/icons/breeze-dark」

執行


find /usr/share/icons/breeze-dark | grep utilities-terminal



顯示


/usr/share/icons/breeze-dark/apps/48/utilities-terminal.svg
/usr/share/icons/breeze-dark/apps/32/utilities-terminal.svg
/usr/share/icons/breeze-dark/apps/64/utilities-terminal.svg
/usr/share/icons/breeze-dark/apps/22/utilities-terminal.svg
/usr/share/icons/breeze-dark/apps/16/utilities-terminal.svg



================================================================================

## 探索「/usr/share/icons/gnome」

執行


find /usr/share/icons/gnome | grep utilities-terminal



顯示


/usr/share/icons/gnome/22x22/apps/utilities-terminal.png
/usr/share/icons/gnome/16x16/apps/utilities-terminal.png
/usr/share/icons/gnome/256x256/apps/utilities-terminal.png
/usr/share/icons/gnome/48x48/apps/utilities-terminal.png
/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
/usr/share/icons/gnome/32x32/apps/utilities-terminal.png





================================================================================

另外以下先提一些可以探索的線索

## 可以探索的路徑

* /usr/share/themes/
* /usr/share/icons
* /etc/gtk-3.0
* ~/.config/gtk-3.0
* ~/.config/gtk-3.0/gtk.css
* ~/.config/gtk-3.0/gtk-dark.css
* ~/.config/gtk-3.0/settings.ini

## 可以探索的關鍵字

* appmenu
* titlebutton
* AppMenu
* AppMenuButton
* button-layout


## 可以探索的「Source Package」

* gtk+3.0
* gnome-shell
* gnome-tweaks
* mutter


================================================================================

## 相關連結

* https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings.description
* https://developer.gnome.org/gtk3/stable/gtk3-Themeable-Stock-Images.html#GTK-ICON-SIZE-MENU:CAPS
* https://developer.gnome.org/gtk3/stable/GtkApplicationWindow.html#GtkApplicationWindow.description

================================================================================

待續...

2019/10/30 13:49
應用擴展 工具箱
回覆: 【Bug】Ubuntu 18.04頂端面板如果取消「Application Menu」
會員五級
註冊日期:
2009/10/29 4:50
所屬群組:
已註冊使用者
等級: 41
HP : 204 / 1021
MP : 928 / 40568
EXP: 87
離線
samwhelp 寫到:
## 觀察報告

紀錄目前觀察到的,

看起來套用在「svg」,就會出現這樣的現象,

雖然「icon-theme」是設定「ubuntu-mono-dark」

但因為「ubuntu-mono-dark」沒有「utilities-terminal」,

而觀察到「gtk」有「fallback」機制,看起來是套用到「Humanity」的「utilities-terminal」,

而「Humanity」的「utilities-terminal」是「svg」

所以就會發生樓主在「#1」提到的情形

您也可以做個小實驗,安裝「breeze-icon-theme」,

裡面的「icon」也都是「svg」的格式,

可以測測看,「icon-theme」套用「Breeze」,就會看到樓主提到的那個情形。

所以目前我想到最簡單的解決方式,就是我一開始提到的,安裝「gnome-icon-theme」。

在「gnome-icon-theme」的「tilities-terminal」,格式是「png」

標題列的「icon」顯示就是正常的,(即使「icon-theme」不是設定「gnome」)。



我安裝「gnome-icon-theme」後果然就變正常了,感謝協助!
有能力向官方回報Bug的人,就請幫忙回報一下吧。

2019/10/30 18:08
應用擴展 工具箱
回覆: 【Bug】Ubuntu 18.04頂端面板如果取消「Application Menu」
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29259
EXP: 6
離線
以下紀錄,是紀錄在研究這個議題時,所了解到的一些相關議題,
紀錄下來,提供給未來對這相關議題有興趣的人一個探索的起點。


================================================================================

從下面兩個頁面

* https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings.description
* https://github.com/nana-4/materia-theme/issues/370

了解到,可以修改下面兩個檔案來測試

* ~/.config/gtk-3.0/gtk.css
* ~/.config/gtk-3.0/gtk-dark.css

================================================================================

以下測試以「~/.config/gtk-3.0/gtk.css」為例。

填寫內容如下


.titlebar button.titlebutton.appmenu {
	margin-right: 80px;
}



可以測試「gnome-tweaks」和「nautilus」,就可以看到程式的「App Menu Button」和「Minimize Button」中間有一個很大的間隔
測試「gnome-terminal」,則沒有間隔。

注意: 測試時,修改了「~/.config/gtk-3.0/gtk.css」的內容,請記得重新啟動程式來觀看修改後的結果。

================================================================================

更多請參考

* https://developer.gnome.org/gtk3/stable/
* https://developer.gnome.org/gtk3/stable/theming.html
* https://developer.gnome.org/gtk3/stable/chap-css-overview.html
* https://developer.gnome.org/gtk3/stable/chap-css-properties.html
* #4 回覆: 不知如何能不顯示標題最小化最大化關閉 (gnome-shell-extension-undecorate)

================================================================================

## 使用「appmenu」當關鍵字,探索「/usr/share/themes」這個資料夾

執行


$ grep 'appmenu' /usr/share/themes -R -n



顯示


/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2868:.titlebar button.titlebutton.appmenu,
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2869:.titlebar button.titlebutton.appmenu:backdrop {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2877:.titlebar button.titlebutton.appmenu:checked,
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2878:.titlebar button.titlebutton.appmenu:active {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2882:.titlebar button.titlebutton.appmenu:backdrop {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2869:.titlebar button.titlebutton.appmenu,
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2870:.titlebar button.titlebutton.appmenu:backdrop {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2878:.titlebar button.titlebutton.appmenu:checked,
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2879:.titlebar button.titlebutton.appmenu:active {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2883:.titlebar button.titlebutton.appmenu:backdrop {



所以可以參考下面兩個檔案裡面的設定

* /usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css
* /usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css

================================================================================

## 使用「appmenu」當關鍵字,探索「/usr/share/themes/Ambiance」這個資料夾


$ grep 'appmenu' /usr/share/themes/Ambiance -R -n



顯示


/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2869:.titlebar button.titlebutton.appmenu,
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2870:.titlebar button.titlebutton.appmenu:backdrop {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2878:.titlebar button.titlebutton.appmenu:checked,
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2879:.titlebar button.titlebutton.appmenu:active {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2883:.titlebar button.titlebutton.appmenu:backdrop {



================================================================================

待續...

2019/10/30 22:21
應用擴展 工具箱
回覆: 【Bug】Ubuntu 18.04頂端面板如果取消「Application Menu」
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29259
EXP: 6
離線
延續「#13」。

================================================================================

以下測試以「~/.config/gtk-3.0/gtk.css」為例。

填寫內容如下


.titlebar button.titlebutton {
	color: red;
}



可以測試「gnome-tweaks」和「nautilus」,
就可以看到程式視窗的「Minimize Button」和「Minimize Button」和「Close Button」
變成紅色了。


注意: 測試時,修改了「~/.config/gtk-3.0/gtk.css」的內容,請記得重新啟動程式來觀看修改後的結果。

================================================================================

更多請參考

* https://developer.gnome.org/gtk3/stable/
* https://developer.gnome.org/gtk3/stable/theming.html
* https://developer.gnome.org/gtk3/stable/chap-css-overview.html
* https://developer.gnome.org/gtk3/stable/chap-css-properties.html

================================================================================

## 使用「titlebutton」當關鍵字,探索「/usr/share/themes」這個資料夾

執行


$ grep 'titlebutton' /usr/share/themes -R -n | less



================================================================================

## 使用「titlebutton」當關鍵字,探索「/usr/share/themes/Ambiance」這個資料夾


$ grep 'titlebutton' /usr/share/themes/Ambiance -R -n



顯示


/usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css:1623:.titlebar.header-bar .button.titlebutton {
/usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css:1634:.titlebar.header-bar .button.titlebutton.close {
/usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css:1640:.titlebar.header-bar .button.titlebutton.close:hover {
/usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css:1644:.titlebar.header-bar .button.titlebutton:hover,
/usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css:1645:.titlebar.header-bar .button.titlebutton:backdrop:hover {
/usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css:1649:.titlebar.header-bar .button.titlebutton:active {
/usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css:1654:.titlebar.header-bar .button.titlebutton.close:active {
/usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css:1658:.titlebar.header-bar .button.titlebutton:backdrop {
/usr/share/themes/Ambiance/gtk-3.20/apps/chromium.css:1:.chromium.maximized .titlebar button.titlebutton
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2766:.titlebar button.titlebutton {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2788:.ssd .titlebar button.titlebutton {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2794:.titlebar button.titlebutton {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2799:.titlebar button.titlebutton:first-child {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2803:.titlebar button.titlebutton:last-child {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2807:.titlebar button.titlebutton.close {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2816:.titlebar button.titlebutton.close:hover {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2823:.titlebar button.titlebutton:hover,
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2824:.titlebar button.titlebutton:backdrop:hover {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2831:.titlebar button.titlebutton:active {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2839:.titlebar button.titlebutton.close:active {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2846:.titlebar button.titlebutton:backdrop {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2855:.titlebar button.titlebutton:hover:backdrop {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2862:.titlebar button.titlebutton:active:backdrop {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2869:.titlebar button.titlebutton.appmenu,
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2870:.titlebar button.titlebutton.appmenu:backdrop {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2878:.titlebar button.titlebutton.appmenu:checked,
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2879:.titlebar button.titlebutton.appmenu:active {
/usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css:2883:.titlebar button.titlebutton.appmenu:backdrop {



================================================================================

## 使用「titlebutton」當關鍵字,探索「/usr/share/themes/Radiance」這個資料夾


$ grep 'titlebutton' /usr/share/themes/Radiance -R -n



顯示


/usr/share/themes/Radiance/gtk-3.0/gtk-widgets.css:1643:.titlebar.header-bar .button.titlebutton {
/usr/share/themes/Radiance/gtk-3.0/gtk-widgets.css:1654:.titlebar.header-bar .button.titlebutton.close {
/usr/share/themes/Radiance/gtk-3.0/gtk-widgets.css:1660:.titlebar.header-bar .button.titlebutton.close:hover {
/usr/share/themes/Radiance/gtk-3.0/gtk-widgets.css:1664:.titlebar.header-bar .button.titlebutton:hover,
/usr/share/themes/Radiance/gtk-3.0/gtk-widgets.css:1665:.titlebar.header-bar .button.titlebutton:backdrop:hover {
/usr/share/themes/Radiance/gtk-3.0/gtk-widgets.css:1669:.titlebar.header-bar .button.titlebutton:active {
/usr/share/themes/Radiance/gtk-3.0/gtk-widgets.css:1674:.titlebar.header-bar .button.titlebutton.close:active {
/usr/share/themes/Radiance/gtk-3.0/gtk-widgets.css:1678:.titlebar.header-bar .button.titlebutton:backdrop {
/usr/share/themes/Radiance/gtk-3.20/apps/chromium.css:1:.chromium.maximized .titlebar button.titlebutton
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2765:.titlebar button.titlebutton {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2787:.ssd .titlebar button.titlebutton {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2793:.titlebar button.titlebutton {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2798:.titlebar button.titlebutton:first-child {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2802:.titlebar button.titlebutton:last-child {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2806:.titlebar button.titlebutton.close {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2815:.titlebar button.titlebutton.close:hover {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2822:.titlebar button.titlebutton:hover,
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2823:.titlebar button.titlebutton:backdrop:hover {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2830:.titlebar button.titlebutton:active {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2838:.titlebar button.titlebutton.close:active {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2845:.titlebar button.titlebutton:backdrop {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2854:.titlebar button.titlebutton:hover:backdrop {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2861:.titlebar button.titlebutton:active:backdrop {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2868:.titlebar button.titlebutton.appmenu,
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2869:.titlebar button.titlebutton.appmenu:backdrop {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2877:.titlebar button.titlebutton.appmenu:checked,
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2878:.titlebar button.titlebutton.appmenu:active {
/usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css:2882:.titlebar button.titlebutton.appmenu:backdrop {



================================================================================

待續...

2019/10/30 22:28
應用擴展 工具箱
回覆: 【Bug】Ubuntu 18.04頂端面板如果取消「Application Menu」
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 901
MP : 671 / 29259
EXP: 6
離線
延續「#13」和「#14」和「#9」。

================================================================================

執行下面指令,下載「Package: libgtk-3-dev」的「SourcePackage: gtk+3.0」。


$ apt-get source libgtk-3-dev



或是執行


$ apt-get source gtk+3.0



會下載「SourcePackage: gtk+3.0」,
並且解開到「gtk+3.0-3.22.30」這個資料夾。

================================================================================

## 使用「appmenu」當關鍵字,探索「gtk+3.0-3.22.30」

執行


$ grep 'appmenu' gtk+3.0-3.22.30 -R -n



顯示


gtk+3.0-3.22.30/gdk/wayland/wm-button-layout-translation.c:42:      else if (strcmp (button, "appmenu") == 0)
gtk+3.0-3.22.30/demos/gtk-demo/demo.gresource.xml:5:    <file preprocess="xml-stripblanks">appmenu.ui</file>
gtk+3.0-3.22.30/demos/gtk-demo/appmenu.ui:4:  <menu id="appmenu">
gtk+3.0-3.22.30/demos/gtk-demo/menus.ui:3:  <menu id="appmenu">
gtk+3.0-3.22.30/demos/gtk-demo/main.c:919:  GMenuModel *appmenu;
gtk+3.0-3.22.30/demos/gtk-demo/main.c:920:  gchar *ids[] = { "appmenu", NULL };
gtk+3.0-3.22.30/demos/gtk-demo/main.c:923:  gtk_builder_add_objects_from_resource (builder, "/ui/appmenu.ui", ids, NULL);
gtk+3.0-3.22.30/demos/gtk-demo/main.c:925:  appmenu = (GMenuModel *)gtk_builder_get_object (builder, "appmenu");
gtk+3.0-3.22.30/demos/gtk-demo/main.c:927:  gtk_application_set_app_menu (GTK_APPLICATION (app), appmenu);
gtk+3.0-3.22.30/demos/gtk-demo/application.c:343:  GMenuModel *appmenu;
gtk+3.0-3.22.30/demos/gtk-demo/application.c:351:  appmenu = (GMenuModel *)gtk_builder_get_object (builder, "appmenu");
gtk+3.0-3.22.30/demos/gtk-demo/application.c:354:  gtk_application_set_app_menu (GTK_APPLICATION (app), appmenu);
gtk+3.0-3.22.30/examples/application4/app-menu.ui:4:  <menu id="appmenu">
gtk+3.0-3.22.30/examples/application4/exampleapp.c:56:  app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
gtk+3.0-3.22.30/examples/application9/app-menu.ui:4:  <menu id="appmenu">
gtk+3.0-3.22.30/examples/application9/exampleapp.c:63:  app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
gtk+3.0-3.22.30/examples/application8/app-menu.ui:4:  <menu id="appmenu">
gtk+3.0-3.22.30/examples/application8/exampleapp.c:63:  app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
gtk+3.0-3.22.30/examples/application5/app-menu.ui:4:  <menu id="appmenu">
gtk+3.0-3.22.30/examples/application5/exampleapp.c:56:  app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
gtk+3.0-3.22.30/examples/application7/app-menu.ui:4:  <menu id="appmenu">
gtk+3.0-3.22.30/examples/application7/exampleapp.c:63:  app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
gtk+3.0-3.22.30/examples/application6/app-menu.ui:4:  <menu id="appmenu">
gtk+3.0-3.22.30/examples/application6/exampleapp.c:63:  app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
gtk+3.0-3.22.30/examples/application10/app-menu.ui:4:  <menu id="appmenu">
gtk+3.0-3.22.30/examples/application10/exampleapp.c:63:  app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
gtk+3.0-3.22.30/.pc/unity-headerbar-maximized-mode.patch/gtk/gtkheaderbar.c:383:                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "appmenu");
gtk+3.0-3.22.30/tests/print-editor.c:797:  "  <menu id='appmenu'>"
gtk+3.0-3.22.30/tests/print-editor.c:890:  GMenuModel *appmenu;
gtk+3.0-3.22.30/tests/print-editor.c:896:  appmenu = (GMenuModel *)gtk_builder_get_object (builder, "appmenu");
gtk+3.0-3.22.30/tests/print-editor.c:899:  gtk_application_set_app_menu (GTK_APPLICATION (app), appmenu);
gtk+3.0-3.22.30/gtk/gtkheaderbar.c:429:                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "appmenu");
gtk+3.0-3.22.30/gtk/gtkapplication.c:84: * If the resources "gtk/menus-appmenu.ui" or "gtk/menus-traditional.ui" are
gtk+3.0-3.22.30/gtk/gtkapplication.c:88: * are referenced from both "gtk/menus-appmenu.ui" and
gtk+3.0-3.22.30/gtk/gtkapplication.c:220:      menuspath = g_strconcat (base_path, "/gtk/menus-appmenu.ui", NULL);
gtk+3.0-3.22.30/gtk/gtkapplication-dbus.c:451:  gtk_application_impl_dbus_publish_menu (dbus, "appmenu", app_menu, &dbus->app_menu_id, &dbus->app_menu_path);
gtk+3.0-3.22.30/gtk/gtkapplication-dbus.c:689:       * show the appmenu or we have a shell that shows menubars
gtk+3.0-3.22.30/docs/reference/gtk/getting_started.xml:654:  app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
gtk+3.0-3.22.30/docs/reference/gtk/html/ch01s04.html:631:<span class="normal">  </span><span class="symbol"><</span><span class="usertype">menu</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"appmenu"</span><span class="symbol">></span>
gtk+3.0-3.22.30/docs/reference/gtk/html/ch01s04.html:700:  app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
gtk+3.0-3.22.30/docs/reference/gtk/html/GtkApplication.html:345:<p>If the resources "gtk/menus-appmenu.ui" or "gtk/menus-traditional.ui" are
gtk+3.0-3.22.30/docs/reference/gtk/html/GtkApplication.html:349:are referenced from both "gtk/menus-appmenu.ui" and



================================================================================

## 使用「titlebutton」當關鍵字,探索「gtk+3.0-3.22.30/gtk/gtkheaderbar.c」

執行


$ grep 'titlebutton' gtk+3.0-3.22.30/gtk/gtkheaderbar.c -n -A 2



顯示


392:          gtk_style_context_add_class (gtk_widget_get_style_context (separator), "titlebutton");
393-
394-          box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, priv->spacing);
--
408:                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
409-                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "icon");
410-                  gtk_widget_set_size_request (button, 20, 20);
--
428:                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
429-                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "appmenu");
430-                  image = gtk_image_new ();
--
449:                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
450-                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "minimize");
451-                  image = gtk_image_new_from_icon_name ("window-minimize-symbolic", GTK_ICON_SIZE_MENU);
--
473:                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
474-                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "maximize");
475-                  image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
--
493:                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
494-                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "close");
495-                  g_object_set (image, "use-fallback", TRUE, NULL);



================================================================================

* https://developer.gnome.org/gtk3/stable/gtk3-Themeable-Stock-Images.html#GTK-ICON-SIZE-MENU:CAPS

================================================================================

以上暫記

2019/10/30 22:59
應用擴展 工具箱

« 1 (2)

 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.