예제 #1
0
파일: panel.py 프로젝트: noelbenz/desky
    def test_rect(self):
        self.assertEqual(Rect(50, 80, 100, 120), self.panel.rect)

        rect = Rect(11, 22, 33, 44)
        self.panel.rect = rect.as_tuple()
        self.assertEqual(rect, self.panel.rect)
        self.assertTrue(self.panel.layout_dirty)

        self.panel.layout_dirty = False
        self.panel.rect = rect
        self.assertFalse(self.panel.layout_dirty)
        self.panel.rect = rect.as_tuple()
        self.assertFalse(self.panel.layout_dirty)
예제 #2
0
파일: panel.py 프로젝트: noelbenz/desky
    def test_margins(self):
        self.assertEqual(Rect(17, 23, 29, 37), self.panel.margins)

        rect = Rect(11, 22, 33, 44)
        self.panel.margins = rect.as_tuple()
        self.assertEqual(rect, self.panel.margins)
        self.assertTrue(self.panel.layout_dirty)

        self.panel.layout_dirty = False
        self.panel.margins = rect
        self.assertFalse(self.panel.layout_dirty)
예제 #3
0
파일: panel.py 프로젝트: noelbenz/desky
    def test_padding(self):
        self.assertEqual(Rect(2, 3, 5, 11), self.panel.padding)

        rect = Rect(11, 22, 33, 44)
        self.panel.padding = rect.as_tuple()
        self.assertEqual(rect, self.panel.padding)
        self.assertTrue(self.panel.layout_dirty)

        self.panel.layout_dirty = False
        self.panel.padding = rect
        self.assertFalse(self.panel.layout_dirty)