* Add a minimap

Add support for GtkSourceViews SourceMap object. Add both a default setting for
new files to the preferences dialog and a menu item to allow temporarily
disabling it in any view.

* Require gtk and gtksourceview 3.18

* load custom css

We can use this to make small tweaks to the interface so every theme doesn't
need to add specific support.

Make use of this new css to clean up the styling of the new overview map frame
a bit.
This commit is contained in:
JosephMcc
2017-09-25 07:01:27 -07:00
committed by Clement Lefebvre
parent 97e1b0a9ec
commit ce59112fd1
17 changed files with 241 additions and 35 deletions

View File

@@ -0,0 +1,7 @@
.xed-map-frame:dir(ltr) {
border-width: 0 0 0 1px;
}
.xed-map-frame:dir(rtl) {
border-width: 0 1px 0 0;
}

View File

@@ -545,6 +545,51 @@
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Overview Map</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="mini_map_checkbutton">
<property name="label" translatable="yes">Display overview map</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="margin_left">12</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
<child type="tab">

View File

@@ -52,6 +52,7 @@
<menuitem name="ViewStatusbarMenu" action="ViewStatusbar"/>
<menuitem name="ViewSidePaneMenu" action="ViewSidePane"/>
<menuitem name="ViewBottomPaneMenu" action="ViewBottomPane"/>
<menuitem name="ViewOverviewMapMenu" action="ViewOverviewMap"/>
<separator/>
<menuitem name="ViewFullscreenMenu" action="ViewFullscreen"/>
<separator/>

View File

@@ -7,16 +7,37 @@
<property name="has_focus">False</property>
<property name="is_focus">False</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow">
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">False</property>
<property name="is_focus">False</property>
<property name="shadow_type">none</property>
<child>
<object class="XedView" id="view">
<object class="GtkScrolledWindow" id="scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">False</property>
<property name="is_focus">False</property>
<property name="shadow_type">none</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="XedView" id="view">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame" id="map_frame">
<property name="visible">True</property>
<style>
<class name="xed-map-frame"/>
</style>
<child>
<object class="GtkSourceMap" id="map">
<property name="visible">True</property>
<property name="view">view</property>
</object>
</child>
</object>
</child>
</object>

View File

@@ -7,5 +7,6 @@
<file preprocess="xml-stripblanks">ui/xed-print-preferences.ui</file>
<file preprocess="xml-stripblanks">ui/xed-searchbar.ui</file>
<file preprocess="xml-stripblanks">ui/xed-view-frame.ui</file>
<file>css/xed-style.css</file>
</gresource>
</gresources>