D27830: [Fonts KCM] Make the font selection dialog highlight the correct style

2020-04-01 Thread Ahmad Samir
ahmadsamir abandoned this revision.
ahmadsamir added a comment.


  See D27808 .

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D27830

To: ahmadsamir, #plasma, davidedmundson, broulik, ervin, meven, bport
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D27830: [Fonts KCM] Make the font selection dialog highlight the correct style

2020-03-05 Thread Ahmad Samir
ahmadsamir added a comment.


  FTR, I had submitted this 
https://codereview.qt-project.org/c/qt/qtbase/+/292695

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D27830

To: ahmadsamir, #plasma, davidedmundson, broulik, ervin, meven, bport
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D27830: [Fonts KCM] Make the font selection dialog highlight the correct style

2020-03-04 Thread Ahmad Samir
ahmadsamir created this revision.
ahmadsamir added reviewers: Plasma, davidedmundson, broulik, ervin, meven.
Herald added a project: Plasma.
ahmadsamir requested review of this revision.

REVISION SUMMARY
  KConfig will clear the styleName font property for "Regular"-like font
  styles (so that setBold(true) can work properly); this means that when
  opening the font selection dialog it may highlight the wrong style for
  the font currently set in kdeglobals, i.e. if the styleName property is
  empty, QFontDialog will always select the first style in the list.
  
  Workaround the issue by setting the "Regular"-like font style of the
  initial font.
  
  adjustAllFonts() doesn't take any arguments, change the QML code accordingly.
  
  Depends on D27808 
  Depends on D27785 
  
  See also https://phabricator.kde.org/D27735 (KConfig)

TEST PLAN
  - Apply this diff and the other two it depends on
  - Edit kdeglobals and remove ",Regular|Normal|Book|Roman" from the *font*= 
entries; append e.g. ",Bold" to one of those entries (pick a font family that 
has a bold style)
  - Open the fonts kcm, and open the font selection dialog for a font, the 
correct "Regular"-like style should be selected
  - Open the font selection dialog for the font you set as Bold; Bold should be 
highlighted
  - Open the "Adjust all fonts" dialog, again the correct style should be 
selected

REPOSITORY
  R119 Plasma Desktop

BRANCH
  l-qfontdlg-fix-initial (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D27830

AFFECTED FILES
  kcms/fonts/fonts.cpp
  kcms/fonts/fonts.h
  kcms/fonts/package/contents/ui/FontWidget.qml
  kcms/fonts/package/contents/ui/main.qml

To: ahmadsamir, #plasma, davidedmundson, broulik, ervin, meven
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart