[KFontChooser] More code cleanup
ClosedPublic

Authored by ahmadsamir on Mar 25 2020, 8:57 AM.

Details

Summary
  • Simplfy the layout by removing the splitter, the goal was to allow resizing the font preview text edit, which seems like an unused feature (I didn't even know that was a splitter until I read the code)
  • Remove redundant tooltips and whatisthis, IMHO it's self-explanatory
  • Move most code out of ctor to an init() method, less d-pointer redirection (and slightly more q pointer redirection)
  • Change the maximum font size from 999 to 512, which is what QFontDialog uses, personally I think neither value is realistic, but I am keeping an open mind (8K monitors?)
Test Plan

kfontchooerdialogtest still works

Diff Detail

Repository
R236 KWidgetsAddons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahmadsamir created this revision.Mar 25 2020, 8:57 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 25 2020, 8:57 AM
ahmadsamir requested review of this revision.Mar 25 2020, 8:57 AM
ahmadsamir planned changes to this revision.Mar 31 2020, 11:32 AM
  • Simplify connect() calls
  • Move the connect() calls of the various checkboxes, in ShowDifferences mode, after the widgets they enable/disable have been created
ahmadsamir updated this revision to Diff 78986.EditedMar 31 2020, 1:15 PM
  • Move family checkbox and listview code next to each other
  • Move connect calls of each checkbox next to the relevant bit of code
dfaure accepted this revision.Apr 11 2020, 8:41 AM
This revision is now accepted and ready to land.Apr 11 2020, 8:41 AM
This revision was automatically updated to reflect the committed changes.