Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
29316172
Commit
29316172
authored
Jan 22, 2019
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): use editor font in files tree and fix bundled font loading
parent
82d0d622
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
JadxSettingsWindow.java
...i/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
+0
-11
MainWindow.java
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
+18
-8
No files found.
jadx-gui/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
View file @
29316172
...
...
@@ -17,8 +17,6 @@ import jadx.gui.ui.codearea.EditorTheme;
import
jadx.gui.utils.LangLocale
;
import
jadx.gui.utils.NLS
;
import
static
jadx
.
gui
.
utils
.
Utils
.
FONT_HACK
;
public
class
JadxSettingsWindow
extends
JDialog
{
private
static
final
long
serialVersionUID
=
-
1804570470377354148L
;
...
...
@@ -38,7 +36,6 @@ public class JadxSettingsWindow extends JDialog {
this
.
prevLang
=
settings
.
getLangLocale
();
initUI
();
registerBundledFonts
();
setTitle
(
NLS
.
str
(
"preferences.title"
));
setSize
(
400
,
550
);
...
...
@@ -48,13 +45,6 @@ public class JadxSettingsWindow extends JDialog {
setLocationRelativeTo
(
null
);
}
public
static
void
registerBundledFonts
()
{
GraphicsEnvironment
grEnv
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
();
if
(
FONT_HACK
!=
null
)
{
grEnv
.
registerFont
(
FONT_HACK
);
}
}
private
void
initUI
()
{
JPanel
panel
=
new
JPanel
();
panel
.
setLayout
(
new
BoxLayout
(
panel
,
BoxLayout
.
PAGE_AXIS
));
...
...
@@ -202,7 +192,6 @@ public class JadxSettingsWindow extends JDialog {
int
i
=
themesCbx
.
getSelectedIndex
();
EditorTheme
editorTheme
=
editorThemes
[
i
];
settings
.
setEditorThemePath
(
editorTheme
.
getPath
());
mainWindow
.
setEditorTheme
(
editorTheme
.
getPath
());
mainWindow
.
loadSettings
();
});
...
...
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
View file @
29316172
...
...
@@ -111,16 +111,11 @@ public class MainWindow extends JFrame {
this
.
cacheObject
=
new
CacheObject
();
resetCache
();
registerBundledFonts
();
initUI
();
initMenuAndToolbar
();
applySettings
();
checkForUpdate
();
}
private
void
applySettings
()
{
setFont
(
settings
.
getFont
());
setEditorTheme
(
settings
.
getEditorThemePath
());
loadSettings
();
checkForUpdate
();
}
public
void
open
()
{
...
...
@@ -649,7 +644,14 @@ public class MainWindow extends JFrame {
setFont
(
font
);
}
public
void
setEditorTheme
(
String
editorThemePath
)
{
public
static
void
registerBundledFonts
()
{
GraphicsEnvironment
grEnv
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
();
if
(
Utils
.
FONT_HACK
!=
null
)
{
grEnv
.
registerFont
(
Utils
.
FONT_HACK
);
}
}
private
void
setEditorTheme
(
String
editorThemePath
)
{
try
{
editorTheme
=
Theme
.
load
(
getClass
().
getResourceAsStream
(
editorThemePath
));
}
catch
(
Exception
e
)
{
...
...
@@ -667,6 +669,14 @@ public class MainWindow extends JFrame {
}
public
void
loadSettings
()
{
Font
font
=
settings
.
getFont
();
Font
largerFont
=
font
.
deriveFont
(
font
.
getSize
()
+
2
.
f
);
setFont
(
largerFont
);
setEditorTheme
(
settings
.
getEditorThemePath
());
tree
.
setFont
(
largerFont
);
tree
.
setRowHeight
(-
1
);
tabbedPane
.
loadSettings
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment