mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix links in buffer format help
The buffer format help can be accessed via first opening the raw buffer viewer (e.g. from the actions section on the texture viewer), and then clicking the "?" under saved formats. It includes a nice summary of the format syntax, but says that "Exhaustive documentation can be found in the online docs." That was supposed to include a link to https://renderdoc.org/docs/how/how_buffer_format.html, and in fact it renders as if it were link, but clicking on it did nothing. This has been fixed by adding `Qt::LinksAccessibleByMouse` and `Qt::LinksAccessibleByKeyboard` to `textInteractionFlags`, and also setting `openExternalLinks` to true (which requires use of a `QTextBrowser` instead of a `QTextEdit`). I left the full list of flags as `Qt::TextBrowserInteraction` does not include the `TextSelectableByKeyboard` flag (which seems useful here and was included before). I verified that other uses of links work properly via checking all of them found via `git grep href`: * CaptureContext: Uses `QMessageBox` which defers to the style's `SH_MessageBox_TextInteractionFlags` which in practice has at least `Qt::LinksAccessibleByMouse`: * https://github.com/qt/qtbase/blob/v5.15.11-lts-lgpl/src/plugins/styles/mac/qmacstyle_mac.mm#L2850-L2852 * https://github.com/qt/qtbase/blob/v5.15.11-lts-lgpl/src/widgets/styles/qcommonstyle.cpp#L5303-L5305 * https://github.com/qt/qtbase/blob/v5.15.11-lts-lgpl/src/widgets/styles/qfusionstyle.cpp#L3702-L3703 * AboutDialog: sets `openExternalLinks` to true on the `version` and `contact` labels in the ui file * AnalyticsConfirmDialog and AnalyticsPromptDialog: uses `on_label_linkActivated` as an automatic slot (as it needs custom handling for opening the documented analytics report) * SettingsDialog: uses `on_analyticsDescribeLabel_linkActivated` as an automatic slot (and only has an internal link for opening the documented analytics report) * CrashDialog: several different ones: * captureFilename works via `on_captureFilename_linkActivated` as an automatic slot (and opens a file in explorer) * reportText has `openExternalLinks` in the ui file * on_send_clicked uses `RDDialog::information` with an email address, which uses `QMessageBox` (see CaptureContext) * finishedText has `openExternalLinks` in the ui file * ExtensionManager: sets `openExternalLinks` to true on the `URL` and `author` labels in the ui file * TipsDialog: sets `openExternalLinks` to true on the `tipUrlLabel` label in the ui file * nv_counter_enumerator.cpp: sets `openExternalLinks` to true on the `counterDescription` label in PerformanceCounterSelection.ui
This commit is contained in:
committed by
Baldur Karlsson
parent
a64c24ff96
commit
e03d7c9002
@@ -57,7 +57,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="helpText">
|
||||
<widget class="QTextBrowser" name="helpText">
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
@@ -78,7 +78,10 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Annotations are supported for explicit layout, bitpacked types like R10G10B10A2, or alternate displays of values including RGB/hexadecimal/octal display. For a complete list see </span><a href="https://renderdoc.org/docs/how/how_buffer_format.html"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">the documentation linked above</span></a><span style=" font-size:8pt;">.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse|Qt::LinksAccessibleByMouse|Qt::LinksAccessibleByKeyboard</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user