Bug 342235 - JJ: Font pre-view screen should have scrolling
Summary: JJ: Font pre-view screen should have scrolling
Status: REPORTED
Alias: None
Product: kfontview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2014-12-27 01:22 UTC by Parameshwara Bhat
Modified: 2024-12-21 12:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Modified file to fix the issue (18.47 KB, patch)
2015-08-11 16:10 UTC, Julian Borrero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Parameshwara Bhat 2014-12-27 01:22:12 UTC
in kfontviewer, if I zoom in to view font quality better, many characters go  out of screen and no way I can view them at that size.

I hope if  kfontviewer has scrolling, kde font management will also have scrolling in it's preview.

Reproducible: Always

Steps to Reproduce:
1.open any font in kfontviewer
2.zoom in , cannot scroll down
3.
Comment 1 bunu 2014-12-27 15:33:59 UTC
[I am a GCI student]

I can confirm this problem. Try on all characters to see the gravity of this.
Comment 2 Myriam Schweingruber 2014-12-29 13:49:28 UTC
Changing this to wishlist, as scrolling is completely absent. Also marking this a Junior Job.
Comment 3 Julian Borrero 2015-08-11 05:01:41 UTC
Hi

Guys I've toying around the source code of the kfontviewer. I have downloaded the source code using git from git clone git://anongit.kde.org/kde-workspace

Also I found the file FontViewPart.cpp and I this this modification could solve the issue:


QScrollArea *scrolls = new QScrollArea;
    scrolls->setWidget(itsPreview);
    
    previewLayout->setMargin(0);
    previewLayout->setSpacing(0);
    faceLayout->setMargin(0);
    faceLayout->setSpacing(KDialog::spacingHint());
    controlsLayout->setMargin(0);
    previewLayout->setSpacing(0);

    itsFrame->setFrameShape(QFrame::NoFrame);
    itsFrame->setFocusPolicy(Qt::ClickFocus);
    previewFrame->setFrameShape(QFrame::StyledPanel);
    previewFrame->setFrameShadow(QFrame::Sunken);
    setComponentData(KComponentData(KFI_NAME));

    itsPreview=new CFontPreview(previewFrame);
    itsPreview->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
    itsFaceLabel=new QLabel(i18n("Show Face:"), itsFaceWidget);
    itsFaceSelector=new KIntNumInput(1, itsFaceWidget);
    itsFaceSelector->setSliderEnabled(false);
    itsInstallButton=new QPushButton(i18n("Install..."), controls);
    itsInstallButton->setEnabled(false);
    
    previewLayout->addWidget(scrolls);


I don't have tested this on my machine because I'm totally new to KDE development, to C++(knowing a bit of C from my old days on college helps understand at high level what's going on the code..) and finally to KDE module building, Yes, I know, kdesrc-build and all of that, but I really don't know how to compile this kfontviewer module.

I tried loading the source on KDevelop and the build button there doesn't help me(some error about CMake...). I also tried on the command line doing an cmake CMakeLists.txt 
-- Configuring done
-- Generating done
-- Build files have been written to: PATH_TO_MY_DIRS...

From there I don't know how much I can do

If there's some link of how build, compile and test the changes I made to the source, and preferably for Ubuntu/Mint, I would appreciate it.

Thank you and hoping someone can point me on the right direction so this bug could be closed.
Comment 4 Julian Borrero 2015-08-11 16:10:43 UTC
Created attachment 93993 [details]
Modified file to fix the issue

Please note the part about the ScrollBar
Comment 5 Christoph Feck 2015-09-27 19:06:06 UTC
Please create a diff so that we can see the changes. Ideally, post them to https://git.reviewboard.kde.org/
If you need help, ask on #kde-devel IRC channel.
Comment 6 Andrew 2024-12-21 12:52:04 UTC
Still actual. No possibility to view that characters which don't fit Font Viewer's window.

Font Viewer: 6.2.4
KDE Frameworks: 6.9.0
Qt: Using 6.8.1 and built against 6.8.1
Fedora Linux 41 (Workstation Edition) (Xcb)