<commit_before>#!/usr/bin/env python3

from PyQt5 import QtCore, QtGui, QtWidgets
import backend
import time
import threading
import os
import re
import subprocess

if os.name == "nt":
    import ctypes
    ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("spotifylyrics.version1")

class Communicate(QtCore.QObject):
    signal = QtCore.pyqtSignal(str, str)
   
class LyricsTextBrowserWidget(QtWidgets.QTextBrowser):
    def wheelEvent(self, e):
        try:
            modifiers = e.modifiers()
            if modifiers == QtCore.Qt.ControlModifier:
                numPixels = e.pixelDelta()
                numDegrees = e.angleDelta()
                factor = 1
                if( not numPixels.isNull()):
                    sign = 1 if numPixels.y() > 0 else -1
                    ui.change_fontsize(sign * factor)
                elif( not numDegrees.isNull()):
                    sign = 1 if numDegrees.y() > 0 else -1
                    ui.change_fontsize(sign * factor)
        except:
            pass

                    
class Ui_Form(object):
               
    sync = False
    ontop = False
    open_spotify = False
    changed = False
    if os.name == "nt":
        settingsdir = os.getenv("APPDATA") + "\\SpotifyLyrics\\"
    else:
        settingsdir = os.path.expanduser("~") + "/.SpotifyLyrics/"
    def __init__(self):
        super().__init__()

        self.comm = Communicate()
        self.comm.signal.connect(self.refresh_lyrics)
        self.setupUi(Form)
        self.set_style()
        self.load_save_settings()
        if self.open_spotify:
            self.spotify()
        self.start_thread()

    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(550, 610)
        Form.setMinimumSize(QtCore.QSize(350, 310))
        self.gridLayout_2 = QtWidgets.QGridLayout(Form)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()<commit_msg>allow wheel scroll default behaviour<commit_after>#!/usr/bin/env python3

from PyQt5 import QtCore, QtGui, QtWidgets
import backend
import time
import threading
import os
import re
import subprocess

if os.name == "nt":
    import ctypes
    ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("spotifylyrics.version1")

class Communicate(QtCore.QObject):
    signal = QtCore.pyqtSignal(str, str)
   
class LyricsTextBrowserWidget(QtWidgets.QTextBrowser):
    wheelSignal = QtCore.pyqtSignal()
    
    def wheelEvent(self, e):
        try:
            modifiers = e.modifiers()
            if modifiers == QtCore.Qt.ControlModifier:
                numPixels = e.pixelDelta()
                numDegrees = e.angleDelta()
                factor = 1
                if( not numPixels.isNull()):
                    sign = 1 if numPixels.y() > 0 else -1
                    ui.change_fontsize(sign * factor)
                elif( not numDegrees.isNull()):
                    sign = 1 if numDegrees.y() > 0 else -1
                    ui.change_fontsize(sign * factor)
            else:
                super(QtWidgets.QTextBrowser, self).wheelEvent(e)
        except:
            pass
                    
class Ui_Form(object):
               
    sync = False
    ontop = False
    open_spotify = False
    changed = False
    if os.name == "nt":
        settingsdir = os.getenv("APPDATA") + "\\SpotifyLyrics\\"
    else:
        settingsdir = os.path.expanduser("~") + "/.SpotifyLyrics/"
    def __init__(self):
        super().__init__()

        self.comm = Communicate()
        self.comm.signal.connect(self.refresh_lyrics)
        self.setupUi(Form)
        self.set_style()
        self.load_save_settings()
        if self.open_spotify:
            self.spotify()
        self.start_thread()

    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(550, 610)
        Form.setMinimumSize(QtCore.QSize(350, 310))
        self.gridLayout_2 = QtWidgets.QGridLayout(Form)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
{'fraction_non_alphanumeric': 0.1029519394974384, 'fraction_numerical': 0.013661868748475237, 'mean_word_length': 2.0460624071322435, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '574036', 'n_tokens_mistral': 1300, 'n_tokens_neox': 1229, 'n_words': 248}