Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲

修改 XMind 預設樣式:讓 Relationship 線條不再擋住文字

編輯:關於 Android 程式設計

這幾天在讀 Google 關於 Android 媒體開發的 Sample。Media 相關的類別結構相當複雜、時序也不好理解,於是就拿出個人最順手的「讀程式碼」工具 XMind,一邊看一邊記。

在梳理 Method 呼叫關係時,XMind 提供的 Relationship 確實能幫上忙,但預設的線條太粗,看起來不夠清爽,而且會擋住後面的文字。翻了一下之後找到一個方法可以改,順便把整個預設樣式的設定位置也記錄下來。

設定檔在哪裡

在 XMind 的安裝目錄下(以 Windows 7 為例):

D:\Program Files (x86)\XMind\plugins\
org.xmind.ui.resources_3.6.51.201607140259\styles\defaultStyles.xml

要改的地方

在檔案中找到 relationship 的樣式定義:

87  <style id="relationship" name="Relationship (Default)" type="relationship">
88      <relationship-properties
89          shape-class="org.xmind.relationshipShape.curved"
90          line-color="#0068cf"
91          line-width="1pt"
92          line-pattern="dot"
93          arrow-begin-class="org.xmind.arrowShape.none"
94          arrow-end-class="org.xmind.arrowShape.normal"
95          fo:font-family="$system$"
96          fo:font-weight="false"
97          fo:color="#707070"
98          fo:font-size="9pt"
99          fo:text-decoration="none"
100         fo:text-align="center"/>
101 </style>

關鍵是 line-width。預設是 3pt,改成 1pt 即可。存檔後重新開啟 XMind,原本畫好的 Relationship 線條就會變細。

成果

這張圖還沒畫完,雖然已經分了層,整體看起來仍然有點亂。不過線條變細之後,至少不會再蓋住節點上的文字,閱讀起來輕鬆多了。

順帶一提

這個 defaultStyles.xml 裡不只 relationship,主題、標題、記事本等其他預設樣式也都在同一個檔案中設定。若覺得 XMind 預設配色不合口味,可以直接在這裡調整 line-color 或 fo:color 等值。

要注意的是,這個檔案位於安裝目錄內,XMind 升級後可能會被覆蓋回預設值,屆時需要重新修改一次。

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © Android教程網 All Rights Reserved