aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/fontsettingspage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Editor: Fix loading color schemesDavid Schulz2023-10-101-2/+2
| | | | | | | | | When the user switched to another builtin color scheme the full paths check do not match anymore if the user starts a Qt Creator with a different install dir. Change-Id: I4692c85a23a7d524497786db4dd8e1a00bb7a9fe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* All: Remove some unneeded #includeshjk2023-09-271-1/+0
| | | | | Change-Id: If9a8fb5e0b32424e3b37ecf3adefc060f86b3630 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils, all: Standardize on QtcSettingshjk2023-09-271-1/+1
| | | | | Change-Id: Id222016f15b1c3bfe6710fe5d0297666d4565ef1 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Editor: avoid accessing the widget from the FontSettingsPageDavid Schulz2023-07-061-6/+8
| | | | | Change-Id: I51dbf4d1c7384f460b84da9602c10667addabebb Reviewed-by: hjk <hjk@qt.io>
* Remove ineffective resize() callsAlessandro Portale2023-05-101-2/+0
| | | | | | | | | | | This removes apparently unnecessary resize() calls on QWidgets based forms which get anyways added to layouts and resized. Most of these size values looked "accidental", i.e. neither divisible by 2 nor by 5, in most cases a remnant from the ui inlining. Change-Id: I95da3b93f2915ef955b5235e5c2ecc94b51f813a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Editor: simplify font to display options page connectionDavid Schulz2023-05-081-1/+0
| | | | | | | Operating on saved settings is less error prone and easier to maintain. Change-Id: I92e3a6b52296cddc302ba2e4410edfd243b8ad32 Reviewed-by: hjk <hjk@qt.io>
* TextEditor: Tr::trhjk2023-01-181-45/+40
| | | | | | Change-Id: I28aa68e25c53c3a4d1c370074d7b3318944dc45a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Prefix Tr::tr contexts with ::hjk2023-01-131-1/+1
| | | | | | | To make outliers better visible in Linguist Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* FontSettings: Remove unneeded QOverloadJarek Kobus2022-12-121-1/+1
| | | | | Change-Id: Ie6a7fe10a0f8975277c007d50ace8ab233167d32 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove unused includes of QGridLayoutJarek Kobus2022-11-181-1/+0
| | | | | | | Change-Id: Ia0823fe1dbadb7c68efc431c3bf0f1ba621a9484 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Remove unused includes of Q[H/V]BoxLayoutJarek Kobus2022-11-181-1/+0
| | | | | | | Change-Id: Ia90b30b634281414268e00722771470f1e7b69c0 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* Fix logical XORJarek Kobus2022-10-071-2/+2
| | | | | | | | | | | | | The '^' is the bitwise XOR, we should use logical XOR in these contexts. The operator!=() should serve for it. More info and reasoning: https://stackoverflow.com/questions/24542 Change-Id: I1bd70bdcab25455f409594f0f14c209d1de11d18 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* TextEditor: Proliferate FilePath use to FontSettings and ColorSchemehjk2022-09-231-23/+23
| | | | | | Change-Id: I3fd2e57b9b922d7bf6269b608da48f4a2e13dfb2 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Re-introduction of the feature to adjust the line spacingFlorian Koch2022-09-121-1/+27
| | | | | | | | | | | | | | | | This already has been implemented in change dc64f3207bdf6c0d295859e47791cb8193e67f4e, but was reverted with change f220cb0e23729ddccf52c25dae4e4696641bc62d) because this does not work with text wrapping rendering, due to internal limitations of Qt. Since this is a highly requested feature (e.g. QTCREATORBUG-13727), but an internal change within Qt is not in sight, the approach taken here is to offer the text wrapping feature in the settings only when the line spacing is set to 100%. Additionally, a change has been made to the layout of the display settings page to reflect this. Fixes: QTCREATORBUG-13727 Change-Id: Ib233cf90a5f336bc591fa1bf860e162fa774dfe3 Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: do not hardcode default colors for function search resultDavid Schulz2022-09-061-4/+0
| | | | | | | | | Using white and black as the defaults results in unpleasant colors in a dark color scheme. Instead rely on the fallback to the colors of C_TEXT that are used in the SearchResultColor constructor. Change-Id: I110aadbae9f07f59fefac07c7ef8fa2af2f3b596 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/8.0'Eike Ziller2022-08-311-11/+17
|\ | | | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/debuggerdialogs.cpp src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp src/plugins/texteditor/fontsettingspage.cpp Change-Id: I5a6accd2065e0d8320045b57ade7b54a9a09aae0
| * Editor: fix importing color schemesDavid Schulz2022-08-301-12/+18
| | | | | | | | | | | | Change-Id: I286de6030462e692a673a61f3630ad3ca7f95a2d Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | FilePath: Remove ::toDir() and deprecation hintsMarcus Tillmanns2022-08-041-27/+23
| | | | | | | | | | Change-Id: Ib561c019e3fd44cd85504ad4286eb3759ce19516 Reviewed-by: hjk <hjk@qt.io>
* | TextEditor: inline fontsettingspage.uihjk2022-07-251-70/+136
|/ | | | | Change-Id: I6bcfa9135ad66146850b0500c6d35889ab5c5df7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Display parent functions in the Find Usages menuIhor Ivlev2022-05-251-0/+4
| | | | | | | | | | | | | | | | To display the parent function, first we find it in displayResults and store the information to SearchResultItem, then SearchResultTreeItemDelegate gets the information and renders it. Similar approach is applied to ClangdClient, in addSearchResultsForFile. This change also adds default style for containing function highlight in the search. Default foreground and background colors are same as usual text colors. Task-number: QTCREATORBUG-27550 Change-Id: Id1251afa192f8d1232524742b7c211770bcb83fb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* TextEditor: Remove foreach / Q_FOREACH usageArtem Sokolovskii2022-05-191-2/+3
| | | | | | | | Task-number: QTCREATORBUG-27464 Change-Id: Ie9594bf661dbeecf22589c1580648252f0bfb7fb Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
* Font settings: Add import and export functionsArtem Sokolovskii2021-09-131-7/+70
| | | | | | | Fixed: QTCREATORBUG-6833 Change-Id: I23eec56aeb53ed10dd7f04c071318f5cc335b14e Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: only remove one scheme at a timeDavid Schulz2021-07-021-1/+0
| | | | | | | | | Since the delete button has already the accept role the delete was triggered twice. First time by the role and second time from the connect of the button clicked signal to QDialog::accept. Change-Id: I9bd6104d36f286ec8bd0b25ee4ab6e7c8306d51a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Editor: fix duplicating color schemesDavid Schulz2021-07-021-16/+14
| | | | | | | | | | | | | Core::ICore::userResourcePath seems to have returned a string with a trailing slash before it returned a Utils::FilePath. This allowed us to just concatenate the resource path with the pattern. Use FilePath::pathAppended to make sure the styles end up in the correct directory. Fixes: QTCREATORBUG-25944 Fixes: QTCREATORBUG-25910 Change-Id: I6ac735e3746e4328b5bbae4e55d91ef642277886 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: Add a default parameter to various ICore::*path functionshjk2021-04-271-2/+2
| | | | | | | | Saves some code on the user side. Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ICore: Change some path API to use FilePathEike Ziller2021-04-261-5/+2
| | | | | | Change-Id: Id841d6177206a021c9e606ce560b47d1ae6e52b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* TextEditor: Define default foreground colors for C_SEARCH_RESULT_ALT1|2Alessandro Portale2020-11-181-0/+4
| | | | | | | | | Since the background colors were defined, also the foreground colors need to be defined to make sure that both light and dark schemes which do not define C_SEARCH_RESULT_ALT1|2 have a legible contrast. Change-Id: Ic954852bdc66d3534f664658b914af1a30795a7d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: Better default background colors for C_SEARCH_RESULT_ALT1|2Alessandro Portale2020-11-171-2/+6
| | | | | | | | | | | C_SEARCH_RESULT_ALT1: Give it a bluish tint. C_SEARCH_RESULT_ALT2: Black on red is quite sneaky on many people's eyes. This changes the red background to a brighter and less saturated red. Change-Id: Id1000119583bf05d47206d877a791ccc42323753 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Revert "Editor: Make line spacing adjustable"David Schulz2020-10-201-15/+1
| | | | | | | | | | | This does not work with text wrapping since there are multiple QTextLines inside a block but we can not adjust the line hight inside a block. This needs to be addressed inside Qt. This reverts commit dc64f3207bdf6c0d295859e47791cb8193e67f4e. Change-Id: If6c28056da9891eeeb75f5939a42f08360013a80 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Editor: Make line spacing adjustableDavid Schulz2020-10-011-1/+15
| | | | | | Fixes: QTCREATORBUG-13727 Change-Id: I3dbc3277795b339bced81dc6c5a048c828183cb6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: Allow different highlight colors in search result windowChristian Kandeler2020-09-181-2/+2
| | | | | | | | | ... and make use of that in CppTool's "Find Usages" by assigning different colors to read and write accesses. Fixes: QTCREATORBUG-12734 Change-Id: I067db2c8d693bb2c5be44249931ee4f0269f7e52 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Editor: set default text foreground color explicitDavid Schulz2020-07-201-1/+3
| | | | | | | | Amends 9182d4eda75033bbbebf50e87e518adc33d499f6. Fixes: QTCREATORBUG-24352 Change-Id: I16171874cf2f2e9fde95b404f7510a502a39f26e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Remove uses QOverload<const QString &>::of(&QComboBox::currentIndexChanged)hjk2020-06-191-4/+4
| | | | | | | | Gone in Qt 6. Task-number: QTCREATORBUG-24098 Change-Id: I7ab2dcb9b7c71a3b0d07f05162ef2752e02dc881 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use dialogParent() instead of mainWindow()Eike Ziller2020-06-021-3/+3
| | | | | | | | | | There are very few reasons to use mainWindow() directly. Especially for modal dialogs, using dialogParent() is important, since that guarantees the stacking order in case of other dialogs currently being open. Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6 Reviewed-by: hjk <hjk@qt.io>
* Fix lupdate issuesEike Ziller2020-03-181-1/+5
| | | | | Change-Id: I26f08ae82354c178f6d26f9138796328b50bfba8 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Editor: Fix crash on exitDavid Schulz2020-03-021-3/+2
| | | | | | | | | | | | Make sure no FontSettingsPageWidget is created when changing the font zoom level in the editor. Otherwise it will crash in the font combo box when closing Qt Creator. Since we can't use the save and emit mechanism from the widget anymore move it to TextEditorSettings Change-Id: I1eb87bbae3cf2b802fb15981e7fc2203106d5565 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Move FontSettingsPage more towards new schemehjk2020-01-301-214/+181
| | | | | | | | | | | Mainly re-using the existing pimpl as new widget implementation, and using the primary storage out of the page (into texteditorsettings). This one is structutally bit different as there is that second path (Ctrl+Wheel) to modify font zoom. Change-Id: I7b85c781c7c53a733b234754beb5bb54664be3fd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Make FontSettingsPage more like the other oneshjk2020-01-271-5/+3
| | | | | Change-Id: I00d758bcdafd39b14498bdf182332ece53215d64 Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: Fix Font & Color settings loadingDavid Schulz2020-01-201-1/+1
| | | | | | | broken after 07b04c20560abed63240095094a2b95114ec61ad Change-Id: I6ec9676aec6dbfee023a5e4710b69cdd709780ef Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* TextEditor: Dissolve TextEditorOptionsPage intermediate hierarchy levelhjk2020-01-161-1/+4
| | | | | | | | It's effectively setting only three properties nowadays, not enough to justify a case of reuse-by-inheritance anymore. Change-Id: I947fbc51e76c8d908da662dd58dce91614c28e08 Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: Allow any point size as font sizeDavid Schulz2020-01-141-1/+15
| | | | | | | | | ...by making the size combobox editable. This way the user can still access the proposed list of point sizes in the combo box. Change-Id: Ia73ccde9277d8960bc2de550f74355b0561d4c8e Fixes: QTCREATORBUG-22536 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Revert "Use QComboBox::currentTextChanged instead of currentIndexChanged"Eike Ziller2019-07-221-1/+2
| | | | | | | | | This reverts commit 25f9d9c43481b0a02d632bf609417c4302fe1fe1. The deprecation was reverted in qtbase 298f750cdba2bd15e735a47ba8d3b9c093367ba3. Change-Id: I8a05f038be4b7fc89e05830435e08c3212e4f116 Reviewed-by: hjk <hjk@qt.io>
* Use QComboBox::currentTextChanged instead of currentIndexChangedAlessandro Portale2019-07-041-2/+1
| | | | | | | | QComboBox::currentIndexChanged is depcrecated as of Qt 5.13 and QComboBox::currentTextChanged is available since Qt 4.1 Change-Id: I97b8eb37765cbb7556cfbde87ea90f91f63bfa63 Reviewed-by: hjk <hjk@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-1/+1
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-051-0/+2
|\ | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/tools/clangpchmanagerbackend/source/taskscheduler.h Change-Id: I518adaf647df412887c2a372416634359f09ad2a
| * TextEditor: Hide controls in scheme editor for builtin schemesDavid Schulz2019-03-041-0/+2
| | | | | | | | | | | | | | | | | | Show a label instead with a link that copies the current color scheme. Fixes: QTCREATORBUG-21874 Change-Id: I74083bac8d7124341b4b63d8e172172235c5e184 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Replace static_casts by QOverload where possiblehjk2019-02-261-4/+3
|/ | | | | | | | | Mainly to get rid of the QProcess::finished deprecation warning. Also adjust coding style in the surrounding connects when needed. Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>