-
Notifications
You must be signed in to change notification settings - Fork 583
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add double width cursor plus highlight focus cleanups plus dark fixups
- Loading branch information
1 parent
51dcfdf
commit 8689b0a
Showing
14 changed files
with
173 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/************************************************************************ | ||
** | ||
** Copyright (C) 2015-2020 Kevin B. Hendricks, Stratford Ontario Canada | ||
** Copyright (C) 2015-2024 Kevin B. Hendricks, Stratford Ontario Canada | ||
** Copyright (C) 2012 John Schember <[email protected]> | ||
** Copyright (C) 2012 Dave Heiland | ||
** Copyright (C) 2012 Grant Drake | ||
|
@@ -32,8 +32,8 @@ | |
#include <QPointer> | ||
|
||
#include "Misc/Utility.h" | ||
#include "Misc/FindReplaceQLineEdit.h" | ||
#include "MiscEditors/SearchEditorModel.h" | ||
#include "Misc/FindReplaceQLineEdit.h" | ||
|
||
FindReplaceQLineEdit::FindReplaceQLineEdit(QWidget *parent) | ||
: QLineEdit(parent), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
/************************************************************************ | ||
** | ||
** Copyright (C) 2012 John Schember <[email protected]> | ||
** Copyright (C) 2012 Dave Heiland | ||
** Copyright (C) 2012 Grant Drake | ||
** Copyright (C) 2020-2024 Kevin Hendricks, Stratford, ON Canada | ||
** Copyright (C) 2012 John Schember <[email protected]> | ||
** Copyright (C) 2012 Dave Heiland | ||
** Copyright (C) 2012 Grant Drake | ||
** | ||
** This file is part of Sigil. | ||
** | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/************************************************************************ | ||
** | ||
** Copyright (C) 2016-2023 Kevin B Hendricks, Stratford, Ontario, Canada | ||
** Copyright (C) 2016-2024 Kevin B Hendricks, Stratford, Ontario, Canada | ||
** Copyright (C) 2012 John Schember <[email protected]> | ||
** Copyright (C) 2012 Dave Heiland | ||
** Copyright (C) 2012 Grant Drake | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/************************************************************************ | ||
** | ||
** Copyright (C) 2019-2023 Doug Massay | ||
** Copyright (C) 2019-2024 Doug Massay | ||
** Copyright (C) 2015-2024 Kevin B. Hendricks, Stratford Ontario Canada | ||
** Copyright (C) 2012 John Schember <[email protected]> | ||
** Copyright (C) 2012-2013 Dave Heiland | ||
|
@@ -191,6 +191,7 @@ void CodeViewEditor::CustomSetDocument(TextDocument &ndocument) | |
ResetFont(); | ||
m_isLoadFinished = true; | ||
m_regen_taglist = true; | ||
if (qEnvironmentVariableIsSet("SIGIL_DOUBLE_TEXTCURSOR_WIDTH")) setCursorWidth(2); | ||
emit DocumentSet(); | ||
} | ||
|
||
|
@@ -2201,6 +2202,7 @@ void CodeViewEditor::focusInEvent(QFocusEvent *event) | |
emit FocusGained(this); | ||
QPlainTextEdit::focusInEvent(event); | ||
HighlightCurrentLine(false); | ||
if (qEnvironmentVariableIsSet("SIGIL_DOUBLE_TEXTCURSOR_WIDTH")) setCursorWidth(2); | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/************************************************************************ | ||
** | ||
** Copyright (C) 2024 Kevin B. Hendricks, Stratford, Ontario Canada | ||
** | ||
** This file is part of Sigil. | ||
** | ||
** Sigil is free software: you can redistribute it and/or modify | ||
** it under the terms of the GNU General Public License as published by | ||
** the Free Software Foundation, either version 3 of the License, or | ||
** (at your option) any later version. | ||
** | ||
** Sigil is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
** GNU General Public License for more details. | ||
** | ||
** You should have received a copy of the GNU General Public License | ||
** along with Sigil. If not, see <http://www.gnu.org/licenses/>. | ||
** | ||
*************************************************************************/ | ||
|
||
#include <QStyle> | ||
#include "Widgets/CaretStyle.h" | ||
|
||
int CaretStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const | ||
{ | ||
if (metric == QStyle::PM_TextCursorWidth) | ||
return 2; | ||
|
||
return QProxyStyle::pixelMetric(metric,option,widget); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/************************************************************************ | ||
** | ||
** Copyright (C) 2024 Kevin B. Hendricks, Stratford, Ontario Canada | ||
** | ||
** This file is part of Sigil. | ||
** | ||
** Sigil is free software: you can redistribute it and/or modify | ||
** it under the terms of the GNU General Public License as published by | ||
** the Free Software Foundation, either version 3 of the License, or | ||
** (at your option) any later version. | ||
** | ||
** Sigil is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
** GNU General Public License for more details. | ||
** | ||
** You should have received a copy of the GNU General Public License | ||
** along with Sigil. If not, see <http://www.gnu.org/licenses/>. | ||
** | ||
*************************************************************************/ | ||
|
||
#pragma once | ||
#ifndef CARETSTYLE_H | ||
#define CARETSTYLE_H | ||
|
||
#include <QProxyStyle> | ||
#include <QCommonStyle> | ||
|
||
class QStyle; | ||
class QStyleOption; | ||
|
||
class CaretStyle : public QProxyStyle | ||
{ | ||
public: | ||
CaretStyle(QStyle *style = 0) : QProxyStyle(style) { } | ||
|
||
int pixelMetric(QCommonStyle::PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const; | ||
|
||
}; | ||
|
||
#endif // CARETSTYLE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think something here is stomping on Windows Dark Mode application style. From the setStyle documentation:
The string must be one of the QStyleFactory::keys(), typically one of "windows", "windowsvista", "fusion", or "macos".