Ignore:
Timestamp:
07/04/19 18:08:19 (5 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Using 'GdkPixbuf' instead of 'gdkPixbuf', 'AppIndicator3' instead of 'appindicator' and 'Pango' instead of 'pango' (re #347)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/flight.py

    r996 r998  
    8484
    8585        titleLabel = Gtk.Label(title)
    86         titleLabel.modify_font(pango.FontDescription("bold 24"))
     86        titleLabel.modify_font(Pango.FontDescription("bold 24"))
    8787        alignment.set_padding(padding_top = 4, padding_bottom = 4,
    8888                              padding_left = 6, padding_right = 0)
     
    714714        layout = cr.create_layout()
    715715        layout.set_text("Malév VA official briefing")
    716         font = pango.FontDescription("sans")
    717         font.set_size(int(32 * scale * pango.SCALE))
    718         font.set_weight(pango.WEIGHT_NORMAL)
     716        font = Pango.FontDescription("sans")
     717        font.set_size(int(32 * scale * Pango.SCALE))
     718        font.set_weight(Pango.WEIGHT_NORMAL)
    719719        layout.set_font_description(font)
    720720
    721721        (_ink, (x0, y0, x1, y1)) = layout.get_extents()
    722         width = float(x1 + 1 - x0) / pango.SCALE
     722        width = float(x1 + 1 - x0) / Pango.SCALE
    723723
    724724        y = 25 * scale
     
    730730        cr.fill()
    731731
    732         y += float(y1 + 1 - y0) / pango.SCALE
     732        y += float(y1 + 1 - y0) / Pango.SCALE
    733733        y += 6 * scale
    734734
     
    736736        layout.set_text("%s (%s) részére" %
    737737                        (loginResult.pilotName, loginResult.pilotID))
    738         font = pango.FontDescription("sans")
    739         font.set_size(int(16 * scale * pango.SCALE))
     738        font = Pango.FontDescription("sans")
     739        font.set_size(int(16 * scale * Pango.SCALE))
    740740        font.set_weight(450)
    741741        layout.set_font_description(font)
    742742        (_ink, (x0, y0, x1, y1)) = layout.get_extents()
    743         width = float(x1 + 1 - x0) / pango.SCALE
     743        width = float(x1 + 1 - x0) / Pango.SCALE
    744744
    745745        cr.move_to((context.get_width() - width)/2.0, y)
     
    749749        cr.fill()
    750750
    751         y += float(y1 + 1 - y0) / pango.SCALE
     751        y += float(y1 + 1 - y0) / Pango.SCALE
    752752        y += 4 * scale
    753753
     
    759759        y += 20 * scale
    760760
    761         font = pango.FontDescription("sans")
    762         font.set_size(int(7 * scale * pango.SCALE))
     761        font = Pango.FontDescription("sans")
     762        font.set_size(int(7 * scale * Pango.SCALE))
    763763        font.set_weight(150)
    764764
     
    807807            labelLayouts.append((labelLayout, valueLayout, labelHeight))
    808808
    809         maxLabelWidth = maxLabelWidth / pango.SCALE
     809        maxLabelWidth = maxLabelWidth / Pango.SCALE
    810810
    811811        valueX = labelX + labelValueFill + maxLabelWidth
     
    815815            (labelFill + maxLabelWidth + labelValueFill + valueFill)
    816816        for (labelLayout, valueLayout, labelHeight) in labelLayouts:
    817             valueLayout.set_width(int(valueWidth * pango.SCALE))
     817            valueLayout.set_width(int(valueWidth * Pango.SCALE))
    818818
    819819            (_ink, (x0, y0, x1, y1)) = valueLayout.get_extents()
    820820            valueHeight = y1 + 1 - y0
    821821
    822             height = float(max(labelHeight, valueHeight))/pango.SCALE
     822            height = float(max(labelHeight, valueHeight))/Pango.SCALE
    823823            layouts.append((labelLayout, valueLayout, height))
    824824
Note: See TracChangeset for help on using the changeset viewer.