AO2-Client icon indicating copy to clipboard operation
AO2-Client copied to clipboard

Apply text effects in the input box as you type

Open Crystalwarrior opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. When you choose colors, apply effects, etc. it should change the colors of those special chars the client detects.

Describe the solution you'd like Current behavior: image Desired behavior: image

Additionally, for chars like \s, \f, etc. it should apply a gray-out effect. It should all function with https://github.com/AttorneyOnline/AO2-Client/issues/682 as well, similar to how Discord handles it.

Additional context This is how Discord handles it: Discord_np4fszBsGn

Crystalwarrior avatar Mar 06 '22 03:03 Crystalwarrior

This is more difficult than it probably sounds. The way colors work in the logs and the text box are via HTML <font> tags, which are obviously unsupported in the text entry field. I don't think it's necessarily impossible but it isn't going to be easy either.

in1tiate avatar Mar 09 '22 21:03 in1tiate

There's functions to insert colors etc. directly bypassing html I think

Crystalwarrior avatar Mar 10 '22 02:03 Crystalwarrior

hmm. see https://doc.qt.io/qt-5/qsyntaxhighlighter.html you can register this to a QTextEdit or QPlainTextEdit which is pretty nifty. You lucked out with this honestly, I didn't know Qt had this class

oldmud0 avatar Mar 19 '22 22:03 oldmud0