mirror of
https://github.com/akiyosi/goneovim.git
synced 2025-08-05 02:24:44 +02:00
Fix problem with extpopupmenu not reflecting correct fonts (#486)
This commit is contained in:
parent
6c22579f7a
commit
25efc26f3a
3 changed files with 4 additions and 24 deletions
|
@ -246,7 +246,6 @@ func InitEditor(options Options, args []string) {
|
|||
|
||||
// e.setAppDirPath(home)
|
||||
|
||||
e.initAppFont()
|
||||
e.extFontFamily = e.config.Editor.FontFamily
|
||||
e.extFontSize = e.config.Editor.FontSize
|
||||
e.fontCh = make(chan *Font, 2)
|
||||
|
@ -515,6 +514,7 @@ func (e *Editor) initWorkspaces(ctx context.Context, signal *neovimSignal, redra
|
|||
}
|
||||
|
||||
ws.initFont()
|
||||
e.initAppFont()
|
||||
ws.registerSignal(signal, redrawUpdates, guiUpdates)
|
||||
ws.updateSize()
|
||||
|
||||
|
@ -566,9 +566,6 @@ func (e *Editor) connectAppSignals() {
|
|||
if e.config.SideBar.Visible {
|
||||
side.show()
|
||||
}
|
||||
|
||||
// editor.initAppFont()
|
||||
// editor.window.SetupTitle(editor.window.TitleStringLabel.Text())
|
||||
})
|
||||
|
||||
// When an application is closed with the Close button
|
||||
|
|
|
@ -22,14 +22,12 @@ type Tabline struct {
|
|||
layout *widgets.QLayout
|
||||
font *gui.QFont
|
||||
color *RGBA
|
||||
fontfamily string
|
||||
currentFileText string
|
||||
Tabs []*Tab
|
||||
showtabline int
|
||||
marginBottom int
|
||||
height int
|
||||
CurrentID int
|
||||
fontsize int
|
||||
marginTop int
|
||||
}
|
||||
|
||||
|
@ -257,16 +255,6 @@ func (t *Tabline) updateFont() {
|
|||
return
|
||||
}
|
||||
|
||||
// size := editor.extFontSize - 1
|
||||
// if size <= 0 {
|
||||
// size = editor.extFontSize
|
||||
// }
|
||||
// if t.fontfamily == editor.extFontFamily && t.fontsize == size {
|
||||
// return
|
||||
// }
|
||||
// t.fontfamily = editor.extFontFamily
|
||||
// t.fontsize = editor.extFontSize
|
||||
// t.font = gui.NewQFont2(editor.extFontFamily, size, 1, false)
|
||||
t.font = t.ws.font.fontNew
|
||||
|
||||
// t.widget.SetFont(t.font)
|
||||
|
|
|
@ -226,7 +226,6 @@ func (ws *Workspace) initFont() {
|
|||
if ws.tabline != nil {
|
||||
ws.tabline.font = ws.font.fontNew
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (ws *Workspace) lazyLoadUI() {
|
||||
|
@ -1887,13 +1886,9 @@ func (ws *Workspace) guiFont(args string) {
|
|||
ws.screen.tooltip.setFont(font)
|
||||
ws.cursor.updateFont(nil, font)
|
||||
|
||||
// Change external font if font setting of setting.yml is nothing
|
||||
if editor.config.Editor.FontFamily == "" {
|
||||
editor.extFontFamily = fontFamily
|
||||
}
|
||||
if editor.config.Editor.FontSize == 0 {
|
||||
editor.extFontSize = int(fontHeight)
|
||||
}
|
||||
// TODO:
|
||||
// Consideration of application UI policies related to external and Neovim internal fonts,
|
||||
// and provide a way to change external fonts.
|
||||
|
||||
if ws.tabline != nil {
|
||||
ws.tabline.updateFont()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue