| adm | Find | login register |
eliu joined: 2007-08-09 posted: 11479 promoted: 617 bookmarked: 187 新竹, 台灣 |
theme 一般就要一致,gcin 也可以設定 background 顏色,所以需求並不是那麼高。 其實我個人反而喜歡輸入的區域是看起來乾乾淨淨的,不要有什麼雜七雜八的花紋。
所謂 setenv 就是修改 gcin.c 加上這一行, setenv("GTK2_RC_FILES", ".../gtkrc", 1);
gtk_init (&argc, &argv);
另外一種不改 gcin source 的方式就是包裝成 script, mv /usr/bin/gcin /usr/bin/gcin_exe /usr/bin/gcin 的內容
export GTK2_RC_FILES=$HOME/.gcin/themes/gtkrc
edited: 1
| |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
老實說,在我作過部份theme之後,我同意老大所說的,背景還是乾乾淨淨會比較好
不過,會想為gcin來點不同的theme
感謝建議,這招應該是最省力的辦法了 ------------------------------------------------------------------- edited: 1
| |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
binding styles to widget classes: widget_class "*Text*" style "bright_yellow"
where a "*" can be used as a wildcard in the class string, in this
example to bind the bright_yellow style to any widget with "Text" in
its the name.
RC styles bound with widget take precedence over RC styles bound with
widget_class, which, in turn, take precedence over RC styles bound with
class.
If multiple declarations are made for the same widget class, the later
one takes priority. This can be overridden by specifying a priority highest, rc, theme, application, gtk, lowest
application specific styles: widget "funky bar" style "mystyle" (原文在此)
老大好~
註:
G:指符號表的背景 ------------------------------------------------------------------- | |||||||||||
本人已不在此站活動 joined: 2007-09-19 posted: 4946 promoted: 325 bookmarked: 206 歸隱山林 |
好像是這個要先看? http://www.gtk.org/~otaylor/gtk/2.0/theme-engines.html http://developer.gimp.org/api/2.0/gtk/gtk-Resource-Files.html
gtk 有個 demo 程式,會把各種 widget 做一個例子出來,應該也可以參考一下。
edited: 1
| |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
感謝LGJ兄,第一個網址的內容我先前已有找到,而且有印下來看了 另外,請問,那個demo是 thewidgetfactory嗎?還是其他? ------------------------------------------------------------------- | |||||||||||
本人已不在此站活動 joined: 2007-09-19 posted: 4946 promoted: 325 bookmarked: 206 歸隱山林 |
gtk resource 要完整掌握的話,會有一點難度。
[edt1023@lgj ~]$ which gtk-demo /usr/local/bin/gtk-demo
| |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
感謝LGJ兄 再貼個木紋質感的上來給大家看看
現在還有幾個困難點需要突破: 如果大家有什麼好的資源要指引或指導小弟怎做,我都相當歡迎,因為我的程度實在太差了 ------------------------------------------------------------------- | |||||||||||
ychao joined: 2007-10-25 posted: 298 promoted: 21 bookmarked: 3 |
倒是gcin有沒有可能支援OnTheSpot呢? edited: 1
| |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
感謝ychao,我可能也是受自然輸入法的影響才這麼想為gcin弄些skin ------------------------------------------------------------------- | |||||||||||
jackblackevo joined: 2007-12-12 posted: 48 promoted: 0 bookmarked: 0 |
gcin-setup視窗的下拉選單開啟關閉後會變形:
| |||||||||||
ychao joined: 2007-10-25 posted: 298 promoted: 21 bookmarked: 3 |
也來貼一下XO上面看到的gcin-setup好了,這裡是開了i18n後的英文介面。
| |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
eliu兄好: 為了透過改變gtab視窗的邊框屬性來改善gtab外觀,小弟針對win-gtab.cpp作了修改和測試。
gtab輸入法的邊框造型是取決於gtk frame,而gtk frame有4種不同邊框屬性: 上圖取自:http://zetcode.com/tutorials/gtktutorial/gtkwidgets/
經過測試,
套用前後的結果比較如下:(左側是目前的gtab外觀,右側是修改後的gtab外觀)
#第412行 #第475行 #第494行 (註:雖然編出來的gcin可以用,但是我不懂gtk,不確定插在上述3個位置會不會造成bug) 或許有人會覺得看起來gtk frame的4種屬性用在gtab看起來都差不多, ------------------------------------------------------------------- | |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
感謝eliu在1.6.1-pre5已經收錄小弟的提議。 第152行: gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_OUT); 第189行: gtk_frame_set_shadow_type(GTK_FRAME(frame_pho), GTK_SHADOW_OUT);
下面會拿一些screenshot來對照注音和gtab輸入法套用這個設定之後的差異,請耐心往下看。 由於1.6.1-pre5開始已經可以針對「 GTK_SHADOW_OUT」作設定, 幾年前小弟有提到過一個不錯的gtk theme:ale-panther_gtk2
image { 這樣一來,gtab輸入法的拆碼框就會套用button樣式,而使得介面效果和詞音輸入法相近了,
------------------------------------------------------------------- | |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
eliu兄好: 剛剛看到ubuntu-tw有人提微軟的螢幕小鍵盤OSK,查了一下 http://jinnsblog.blogspot.com/2008/10/osk-on-screen-keyboard.html 微軟的螢幕小鍵盤外圍有邊框包起來,小弟個人覺得有邊界會讓畫面看起來比較「精緻」一些, 我本來想改好source code再放上來,但是這次看不懂win-kbm.cpp、win-message.cpp和win-sym.cpp了... 如果eliu兄覺得不妥或沒必要,不用改也沒關係,這個提議只算是錦上添花而已。感謝~ 以下是有無邊框的對照圖: ------------------------------------------------------------------- | |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
eliu兄好: gcin預設不使用「顯示內框」,不知道是什麼緣故?也許是為了走精簡風或節省記憶體? ------------------------------------------------------------------- | |||||||||||
winlin joined: 2007-09-25 posted: 1859 promoted: 111 bookmarked: 33 |
感謝eliu兄:1.6.4-pre6預設此一特色了! ------------------------------------------------------------------- |
| adm | Find | login register |