Skip to content

Commit

Permalink
Merge pull request #277 from markotoplak/dfd-fix
Browse files Browse the repository at this point in the history
[FIX] Data Frame Display: make it work again
  • Loading branch information
markotoplak authored Dec 5, 2024
2 parents d29f649 + 03e1b62 commit 3fd788e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions orangecontrib/prototypes/widgets/owdfdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
from typing import Optional, Tuple, List, Dict, Callable, Any, Iterable, \
Sequence, Mapping, MutableMapping

from PyQt5.QtCore import (
from AnyQt.QtCore import (
Qt, QSize, QAbstractItemModel, QAbstractTableModel, QModelIndex,
QObject
)

from PyQt5.QtGui import (
from AnyQt.QtGui import (
QIcon, QColor, QPainter, QStaticText, QTransform
)
from PyQt5.QtWidgets import (
from AnyQt.QtWidgets import (
QTableView, QStyle, QStyledItemDelegate, QStyleOptionViewItem, QVBoxLayout,
QApplication,
)
Expand All @@ -38,7 +38,7 @@

from Orange.widgets import widget
from Orange.widgets.utils import itemmodels
from Orange.widgets.data.owtable import BlockSelectionModel
from Orange.widgets.utils.itemselectionmodel import BlockSelectionModel
from Orange.widgets.utils.textimport import StampIconEngine


Expand Down Expand Up @@ -251,10 +251,10 @@ class OWDataFrameDisplay(widget.OWWidget):
name = "Data Frame Display"

class Inputs:
data = widget.Input("Data Frame", DisplayData,)
data = widget.Input("Data Frame", DisplayData, auto_summary=False)

class Outputs:
data = widget.Output("Data Frame", DisplayData,)
data = widget.Output("Data Frame", DisplayData, auto_summary=False)

want_basic_layout = False

Expand Down Expand Up @@ -506,7 +506,7 @@ def paint(self, painter, option, index):
text_pos_y = trect.center().y() - tsize.height() / 2

painter.setFont(opt.font)
painter.drawStaticText(text_pos_x, text_pos_y, st)
painter.drawStaticText(round(text_pos_x), round(text_pos_y), st)

def __static_text_elided_cache(
self, option: QStyleOptionViewItem, width: int) -> QStaticText:
Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/prototypes/widgets/oworaclesql.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from Orange.widgets import gui, settings
from Orange.widgets.widget import OWWidget, Msg, Output
from Orange.data import Table, Domain, ContinuousVariable, DiscreteVariable, TimeVariable
from PyQt5.QtCore import QTimer
from AnyQt.QtCore import QTimer

try:
import cx_Oracle
Expand Down

0 comments on commit 3fd788e

Please sign in to comment.